---
title: "Request access token"
method: POST
path: "/oauth/token"
tags: ["Authentication"]
---

# Request access token

`POST /oauth/token`

## Request

- Base URL: `https://auth.getpaid.io`
- URL: `https://auth.getpaid.io/oauth/token`
- Auth: none required
- TypeScript: <https://skmtc.dev/getpaid/apis/getpaid-api/docs/oauth/token/post.ts> (a function with typed inputs; its response is checked against the schema)

Obtain an OAuth 2.0 access token to authenticate API requests

## Request body

- RequestAccessTokenRequest
  - `client_id` string, required: Your OAuth client ID for the environment, live or sandbox, you are requesting the token for.
  - `client_secret` string, required: Your OAuth client Secret for the environment, live or sandbox, you are requesting the token for.
  - `audience` 'https://api.sandbox.getpaid.io' | 'https://api.getpaid.io', uri, required: The API you wish to integrate with. Use this to switch between sandbox and live environment.
  - `grant_type` 'client_credentials', required: The OAuth grant type.

## Response `200`

OK

- RequestAccessTokenResponse
  - `access_token` string, required: The OAuth access token (JWT) used to authenticate to Getpaid API.
  - `scope` string, required: The API scopes granted to the access token.
  - `expires_in` integer, required: The duration (in seconds) until the access token expires.
  - `token_type` 'Bearer', required: The type of token returned.

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/getpaid/apis/getpaid-api.md) - [All operations](https://skmtc.dev/getpaid/apis/getpaid-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getpaid/apis/getpaid-api/revisions/458eae3d49ad?raw)
