---
updatedAt: 2025-11-11T00:33:08.000Z
agentTools:
  projectIndex: https://docs.interswitchgroup.com/v1.1/llms.txt
---

# Authentication

## Make a call to the Authentication API

This API handles obtaining an access token for authentication

```coffeescript Authentication Url
POST https://sandbox.interswitchng.com/passport/oauth/token
```

Access tokens for all grant types can be obtained from the following URL:

**Headers**\
The Authentication API endpoints require a Basic authorization header. In addition, the request body is sent as a URL-encoded form. As a result, the following headers would be set:

**Authorization:**

```coffeescript Authorization
Basic <Base64Encoded string of client_id:client_secret>
```

**Content-Type:**

```coffeescript
application/x-www-form-URL-encoded
```

**Client Credentials Grant Type**\
Use this endpoint to get an access token using client credentials\\

| Field       | Type   | Required |
| ----------- | ------ | -------- |
| grant\_type | String | Required |
| scope       | String | Optional |

Sample Request Body

```coffeescript Request Body
grant_type=client_credentials&scope=profile
```

| Field         | Description                                                                                                                                           |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| access\_token | The access token that would be used to consume the secure APIs                                                                                        |
| expires\_in   | The time this token will expire in seconds. Ensure that the token is renewed at least 30 seconds before the token expires to prevent expiry in flight |

```coffeescript Successful
{
  "access_token": "eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsicGFzc3BvcnQiXSwic2NvcGUiOlsicHJvZmlsZSJdLCJleHAiOjMwMTg1Mjk4ODksImp0aSI6IjBlYWYwMWIzLTM4M2QtNDFkNi1hOTgzLWI3OTIwNDU3ODBjMyIsImNsaWVudF9pZCI6InRlc3RjbGllbnQifQ.OaLlGSTLFHGu7553HNhzuBOIiQvdiNVNPAm5-opCq7JPugEG2ubPtLZLu2znr0aJkHR0BGiV2e9ZSrkp6cxYoT74
}
```
```Text Failed response
{"error": "invalid_request","error_description": "Missing grant type"}
```