> For the complete documentation index, see [llms.txt](https://docs.neox.vn/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neox.vn/docs/disbursement/integration/generate-token-api.md).

# Generate token API

* PLATFORM should call this API to get Bearer token to use in all other APIs.
* Authentication Mechanism: OAuth 2.0
* API:
  * Path: */v2/auth/oauth2/token*
  * Method: POST
  * Request: Content-Type: application/json

**Request Parameter**

<table><thead><tr><th width="186">Parameter</th><th width="123">Data Type</th><th width="106">Required</th><th>Description</th></tr></thead><tbody><tr><td>grant_type</td><td>String</td><td>Y</td><td>“<em>client_credentials</em>” as default.</td></tr><tr><td>client_id</td><td>String</td><td>Y</td><td>API integration information in the profile section on the Merchant Portal.</td></tr><tr><td>client_secret</td><td>String</td><td>Y</td><td>API integration information in the profile section on the Merchant Portal.</td></tr><tr><td>scope</td><td>String</td><td>Y</td><td>“<em>disbursement</em>” as default.</td></tr></tbody></table>

**Response Data**

<table><thead><tr><th width="219">Parameter</th><th width="153.33333333333331">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>Number</td><td>System’s error code.</td></tr><tr><td>message</td><td>String</td><td>Error description.</td></tr><tr><td>access_token</td><td>String</td><td>To authenticate for all other APIs.</td></tr><tr><td>token_type</td><td>String</td><td>“bearer” as default.</td></tr><tr><td>expires_in</td><td>Number</td><td>“access_token” expiration time, in seconds.</td></tr></tbody></table>
