---
title: "[Beta] Exchange auth code for user's access and refresh token"
method: POST
path: "/v1/oauth/token"
tags: ["OAuth"]
---

# [Beta] Exchange auth code for user's access and refresh token

`POST /v1/oauth/token`

Supports `authorization_code`, `refresh_token`, and `urn:ietf:params:oauth:grant-type:jwt-bearer` grant types. The `jwt-bearer` grant type (IDJAG — identity-directed JWT assertion) is in beta and available on Team and Enterprise plans only.

## Response `200`

- OAuthTokenResponse
  - `access_token` string, required
  - `refresh_token` string — The `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type issues access tokens only, no refresh token is returned and the token cannot be revoked via `/v1/oauth/revoke`.
  - `expires_in` integer, required
  - `token_type` 'Bearer', required

---

[API](https://skmtc.dev/supabase/apis/management-api.md) · [All operations](https://skmtc.dev/supabase/apis/management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/supabase/management-api/revisions/a7cb39418064/schema)
