---
title: "OAuth Token Generate"
method: POST
path: "/oauth/token"
tags: ["OAuth"]
---

# OAuth Token Generate

`POST /oauth/token`

Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call.

## Request body

- OAuthTokenGenerateRequest
  - `client_id` string, required — The client id of the app requesting authorization.
  - `client_secret` string, required — The secret token of your app.
  - `code` string, required — The code passed to your callback when the user granted access.
  - `grant_type` string, required — When generating a new token use `authorization_code`.
  - `state` string, required — Same as the state you specified earlier.

## Response `200`

successful operation

- OAuthTokenResponse
  - `access_token` string
  - `token_type` string
  - `refresh_token` string
  - `expires_in` integer — Number of seconds until the `access_token` expires. Uses epoch time.
  - `state` string, nullable

## Other responses

- `4XX` — failed_operation

---

[API](https://skmtc.net/hellosign/apis/dropbox-sign-api.md) · [All operations](https://skmtc.net/hellosign/apis/dropbox-sign-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hellosign/dropbox-sign-api/versions/2ea3f04008af/schema)
