---
title: "Create Bearer token"
method: POST
path: "/auth/oauth/v2/token"
tags: ["Authentication"]
---

# Create Bearer token

`POST /auth/oauth/v2/token`

## Request

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

Request a Bearer token that will be used as an access token when making calls to resources.  The credentials need to be sent within the body of the request.

## Request body `application/x-www-form-urlencoded`

- object
  - `grant_type` string, required: Send "client_credentials".
  - `client_id` string, required: The applications API key.
  - `client_secret` string, required: The applications corresponding secret.

## Response `200`

successful operation

- Authentication: The Authentication Response
  - `access_token` string: The token which will be used for making future calls.
  - `expires_in` string: Number of seconds remaining before the token expires.
  - `scope` string: This will always return 'oob' (out of band) based on OAuth configuration.
  - `token_type` string: This will always return 'Bearer' based on OAuth configuration.

---

[API](https://skmtc.dev/paychex/apis/external-api.md) - [All operations](https://skmtc.dev/paychex/apis/external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paychex/apis/external-api/revisions/07161d3e073f?raw)
