> For the complete documentation index, see [llms.txt](https://docs.lenderlink.ph/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lenderlink.ph/product-guides/api-integration-guides/authentication.md).

# Authentication

{% stepper %}
{% step %}

### Prerequisites

In order to obtain an API Token you first need to have **client\_id** and **client secret** from our team.
{% endstep %}

{% step %}

### Request the Access Token

To authenticate and obtain an OAuth token, follow the standard OAuth token request flow.

* **POST** API URL

```
https://sandbox-app.lenderlink.ph/oauth/token
```

* To request the Access Token, submit a POST request to the API URL, including the following body parameters in JSON format:

```json

{
    "grant_type": "client_credentials",
    "client_id": "your client id",
    "client_secret": "your client secret"
}
                                        
```

{% endstep %}

{% step %}

### Handling the Token Response

Upon successful validation, the authorization server will respond with an access token:

```json

{
    "token_type": "Bearer",
    "expires_in": 86400,
    "access_token": "eyJ0eXAiOiJKasd10sJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI5YTc4MzVm..."
}
                                        
```

{% hint style="warning" %}
**Token Lifespan**

Access tokens have a limited lifespan of **86400** seconds. Once the token expires, you can obtain a new one.
{% endhint %}
{% endstep %}
{% endstepper %}
