---
title: "GetIDToken"
method: POST
path: "/gitpod.v1.IdentityService/GetIDToken"
tags: ["gitpod.v1.IdentityService"]
---

# GetIDToken

`POST /gitpod.v1.IdentityService/GetIDToken`

Gets an ID token for authenticating with other services.

 Use this method to:
 - Obtain authentication tokens for service-to-service calls
 - Access protected resources
 - Generate scoped access tokens

 ### Examples

 - Get token for single service:

   Retrieves a token for authenticating with one service.

   ```yaml
   audience:
     - "https://api.gitpod.io"
   ```

 - Get token for multiple services:

   Retrieves a token valid for multiple services.

   ```yaml
   audience:
     - "https://api.gitpod.io"
     - "https://ws.gitpod.io"
   ```

## Request body

- GitpodV1GetIDTokenRequest
  - `audience` string[]
  - `version` 'ID_TOKEN_VERSION_UNSPECIFIED' | 'ID_TOKEN_VERSION_V1' | 'ID_TOKEN_VERSION_V2'

## Response `200`

Success

- GitpodV1GetIDTokenResponse
  - `token` string

## Other responses

- `default` — Error

---

[API](https://skmtc.net/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.net/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/44d50c2ac284/schema)
