Identity

identity

Methods

Exchange Token -> { accessToken }
post/gitpod.v1.IdentityService/ExchangeToken

Exchanges an exchange token for a new access token.

Use this method to:

  • Convert exchange tokens to access tokens
  • Obtain new access credentials
  • Complete token exchange flows

Examples

  • Exchange token:

    Trades an exchange token for an access token.

    exchangeToken: "exchange-token-value"
    
Get Authenticated Identity -> { organizationId, subject }
post/gitpod.v1.IdentityService/GetAuthenticatedIdentity

Retrieves information about the currently authenticated identity.

Use this method to:

  • Get current user information
  • Check authentication status
  • Retrieve organization context
  • Validate authentication principal

Examples

  • Get current identity:

    Retrieves details about the authenticated user.

    {}
    
Response fields
organizationId: string
Optional
subject:
Optional

subject is the identity of the current user

Request example
200Example
Get ID Token -> { token }
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.

    audience:
      - "https://api.gitpod.io"
    
  • Get token for multiple services:

    Retrieves a token valid for multiple services.

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