Skip to content
Ona Docs

ExchangeToken

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"
Body ParametersJSONExpand Collapse
exchangeToken: optional string

exchange_token is the token to exchange

ReturnsExpand Collapse
accessToken: optional string

access_token is the new access token

ExchangeToken

curl https://app.gitpod.io/api/gitpod.v1.IdentityService/ExchangeToken \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $GITPOD_API_KEY" \
    -d '{}'
{
  "accessToken": "accessToken"
}
Returns Examples
{
  "accessToken": "accessToken"
}