---
title: "Generate Access Token"
method: POST
path: "/oauth/token"
tags: ["API Credentials"]
---

# Generate Access Token

`POST /oauth/token`

## Request

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

To get an access token, post your `client_id` and `client_secret`.
The request responds with an access token, which is valid for 24 hours. Pass the token as the `Authorization`
header with `Bearer` appended before the token, e.g. `Bearer {access_token}`.

**Note: These access tokens are meant only for backend-to-backend calls. If you are looking to authorize
a web component, please see the Web Component Token API**

## Request body

- object
  - `client_id` string: the client id for your (live or test) account
  - `client_secret` string: the client secret for your (live or test) account

## Response `200`

An access token has been granted

- object
  - `access_token` string: an access token to pass to our API as the `Authorization` header with `Bearer` appended before the token, e.g. `Bearer {access_token}`

---

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