---
title: "Generate access and refresh tokens"
method: POST
path: "/oauth/token"
---

# Generate access and refresh tokens

`POST /oauth/token`

Generate access and refresh tokens using the authorization code.

## Response `200`

Tokens generated successfully

- object
  - `access_token` string
  - `token_type` string
  - `refresh_token` string
  - `expires_in` number

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `500` — Internal server error

---

[API](https://skmtc.net/supabase/apis/dalil-oauth-resource-api.md) · [All operations](https://skmtc.net/supabase/apis/dalil-oauth-resource-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/supabase/dalil-oauth-resource-api/versions/40a7125e0355/schema)
