---
title: "Generate a token"
method: POST
path: "/token"
tags: ["Authorization"]
---

# Generate a token

`POST /token`

Generate a token or a refresh token

## Request body

- AuthToken — Authorization token flow
  - `client_id` string, required — The client ID of your application that was generated when you [registered it](https://developer.sumup.com/docs/register-app).
  - `client_secret` string, required — The client secret of your application that was generated when you [registered it](https://developer.sumup.com/docs/register-app).
  - `code` string, required — The authorization code that you received from requesting an authorization code.
  - `grant_type` 'authorization_code' | 'refresh_token', required — The grant type used for obtaining an access token.
  - `refresh_token` string — A **required** parameter when generating a refresh token.

## Response `200`

OK

- object
  - `access_token` string — The access token that you need to use in your requests to the SumUp API.
  - `expires_in` integer — The validity of the access token in seconds.
  - `refresh_token` string — The refresh token provided in the request call
  - `scope` string — List of authorization scopes granted to your access token.
  - `token_type` string — The type of the token. The value is always `Bearer`.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.dev/sumup/apis/sumup-rest-api.md) · [All operations](https://skmtc.dev/sumup/apis/sumup-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sumup/sumup-rest-api/revisions/9d3d2c99f041/schema)
