---
title: "Request an access token"
method: POST
path: "/auth/token/{clientId}"
tags: ["Authentication"]
---

# Request an access token

`POST /auth/token/{clientId}`

Retrieve an access token to authenticate your requests to Payrails' services.

The access token will be valid for a limited duration indicated by the `expires_in` field in the response.

You should store the token on your side until it expires, at which point you will need to obtain a new one by making a new request.

## Path parameters

- `clientId` string, required

## Response `200`

OK - A successful access token.

- object
  - `access_token` string, required — The access token issued.
  - `token_type` string, required — Case insensitive token type issued.
  - `expires_in` integer, required — The lifetime in seconds of the access token.

## Other responses

- `400` — Bad Request.
- `401` — Unauthorized.

---

[API](https://skmtc.net/payrails/apis/payrails-api-reference.md) · [All operations](https://skmtc.net/payrails/apis/payrails-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/payrails/payrails-api-reference/revisions/9dd2f0158582/schema)
