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

# 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.

   ```yaml
   exchangeToken: "exchange-token-value"
   ```

## Request body

- GitpodV1ExchangeTokenRequest
  - `exchangeToken` string — exchange_token is the token to exchange

## Response `200`

Success

- GitpodV1ExchangeTokenResponse
  - `accessToken` string — access_token is the new access token

## Other responses

- `default` — Error

## Changes

- **2025-02-18** `cd6a05ae99d2` — 1 warning
  - removed the optional property `detail` from the response with the `default` status

[Change history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.IdentityService/ExchangeToken/post.md)

---

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