---
title: "Exchange authorization code for API key"
method: POST
path: "/public/v2/oauth/token/"
tags: ["OAuth"]
---

# Exchange authorization code for API key

`POST /public/v2/oauth/token/`

Exchange an OAuth authorization code for a DualEntry API key.

## Request body

- TokenRequest
  - `grant_type` 'authorization_code', required
  - `code` string, required
  - `code_verifier` string, required
  - `redirect_uri` string, required

## Response `200`

OK

- TokenResponse
  - `api_key` string, required
  - `organization_id` integer, required
  - `user_email` string, required

## Other responses

- `400` — Bad Request

---

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