Skip to main content
POST
/
api
/
auth
/
token
Issue OAuth2/JWT access token
curl --request POST \
  --url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/auth/token \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "grantType": "client_credentials",
  "clientId": "your-client-id",
  "clientSecret": "your-client-secret",
  "username": "user@example.com",
  "password": "password"
}'
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "tokenType": "Bearer",
  "expiresIn": 3600
}
Issue OAuth2/JWT access token using client credentials or password grant flow.

Reference Documentation

For more information on authentication flows, please refer to:

Authorizations

Authorization
string
header
required

Body

application/json
grantType
enum<string>
Available options:
client_credentials,
password
Example:

"client_credentials"

clientId
string
Example:

"your-client-id"

clientSecret
string
Example:

"your-client-secret"

username
string
Example:

"user@example.com"

password
string
Example:

"password"

Response

Token issued successfully

accessToken
string
Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

tokenType
string
Example:

"Bearer"

expiresIn
integer
Example:

3600

I