---
title: "Generate an access token"
method: POST
path: "/v4/auth/token"
tags: ["Auth"]
---

# Generate an access token

`POST /v4/auth/token`

Given a `authorizationCode`, generate a long-lived access token to make API requests on behalf of a customer.

## Request body

- AuthTokenV4RequestDto
  - `authorizationCode` string, required — The authorization code to use to generate a token

## Response `201`

- AuthTokenV4ResponseDto
  - `accessToken` string, required — The access token to use to generate a token

## Other responses

- `400` — Returned when improperly formatted or missing fields in request body
- `401` — Returned when improper keys or headers are used in the request
- `403` — Returned when the caller is not authorized to access the resource
- `404` — Returned when the authorizationCode is not found
- `500` — Returned when an internal server error occurs

---

[API](https://skmtc.net/slopepay/apis/slope-v4-api.md) · [All operations](https://skmtc.net/slopepay/apis/slope-v4-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/slopepay/slope-v4-api/revisions/cbdbc861073b/schema)
