---
title: "Exchange an authorization code for an access and refresh token"
method: POST
path: "/v1/oauth/token"
tags: ["OAuth"]
---

# Exchange an authorization code for an access and refresh token

`POST /v1/oauth/token`

## Headers

- `Notion-Version` '2026-03-11', required

## Request body

- union
  - object
    - `grant_type` 'authorization_code', required
    - `code` string, required
    - `redirect_uri` string
    - `external_account` object
      - `key` string, required
      - `name` string, required
  - object
    - `grant_type` 'refresh_token', required
    - `refresh_token` string, required

## Response `200`

- object
  - `access_token` string, required
  - `token_type` 'bearer', required
  - `refresh_token` string, nullable, required
  - `bot_id` string, uuid, required
  - `workspace_icon` string, nullable, required
  - `workspace_name` string, nullable, required
  - `workspace_id` string, uuid, required
  - `owner` union, required
    - object
      - `type` 'user', required
      - `user` union, required
        - object
          - `type` 'person', required
          - `person` object, required
            - `email` string, required
            - `email_verified` boolean
          - `name` string, nullable, required
          - `avatar_url` string, nullable, required
          - `id` string, required
          - `object` 'user', required
        - PartialUserObjectResponse
          - `id` string, uuid, required
          - `object` 'user', required — Always `user`
    - object
      - `type` 'workspace', required
      - `workspace` true, required
  - `duplicated_template_id` string, uuid, nullable, required
  - `request_id` string, uuid

## Other responses

- `400`
- `401`
- `403`
- `500`

---

[API](https://skmtc.net/notion/apis/notion-api.md) · [All operations](https://skmtc.net/notion/apis/notion-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/notion/notion-api/revisions/dee5763763b0/schema)
