---
title: "Get OAuth2 access token"
method: POST
path: "/oauth/token"
tags: ["OAuth"]
---

# Get OAuth2 access token

`POST /oauth/token`

OAuth2 client credentials flow endpoint. Generate a new access token using client credentials. The "client_id" (username) and "client_secret" (password) must be passed as Basic Auth credentials. Ex: Authorization: Basic Base64Encode(client_id:client_secret). The returned access token should be used as Bearer token for subsequent API calls: Authorization: Bearer {access_token}

## Response `200`

Successfully generated OAuth2 access token

- TokenResponse — OAuth2 access token response structure containing the bearer token and expiration details
  - `access_token` string — @Description The OAuth2 access token for API authentication - use as Bearer token in Authorization header @Example 580defdbe1d21e0001c67e5c2a0a6c98ba8b4a059dc5825388501574
  - `expires_in` integer — @Description Token expiration time in seconds from issuance @Example 3600
  - `token_type` string — @Description OAuth2 token type - always "bearer" for this implementation @Example bearer

## Other responses

- `403` — Invalid credentials

---

[API](https://skmtc.net/alternativepayments/apis/alternative-payments.md) · [All operations](https://skmtc.net/alternativepayments/apis/alternative-payments/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/alternativepayments/alternative-payments/revisions/730efda86cd1/schema)
