capabilities.work

Exchange a code or refresh token for an access token

One step with GitLab. We can help you get access.

Get something done

Exchange a code or refresh token for an access token

with GitLab
Works with AI assistants

Use GitLab: its GitLab OAuth 2.0 Tokens API lets you exchange a code or refresh token for an access token in a single step (POST /oauth/token). GitLab also has an MCP server, so an AI assistant like Claude or ChatGPT can do it for you. capabilities.work can help you get signed up and connected.

  • How do I turn an OAuth authorization code into an access token?
  • Can I refresh an expired OAuth access token without asking the user again?
  • How long do OAuth access tokens last?
Say it to your AI assistant
  • Exchange code {code} for an access token for client {client_id} using grant {grant_type}.
  • Get a new access token for client {client_id} from refresh token {refresh_token} with grant {grant_type}.
  • Poll for a token with device code {device_code} for client {client_id}, grant {grant_type}.
For your developer

POST /oauth/token in GitLab OAuth 2.0 Tokens API. Full spec on APIs.io.