---
updatedAt: 2026-02-26T13:07:53.000Z
agentTools:
  projectIndex: https://docs.ngenius-payments.com/llms.txt
---

# Request an access token

This section will describe how you will authenticate yourself to the N-Genius Online identity services, and receive an access token in return, which you can then use to perform more meaningful operations using the N-Genius Online payment APIs.

## Request an access token

The first step for any **N-Genius Online** gateway interaction is to validate ourselves with the identity service and obtain an access token. This token allows us to execute operations on the gateway APIs with authority, and whilst a single token will expire after 5 minutes, we can use our Service Account API key to generate one at any time.

**HTTP Request Method**: POST\
**Resource (URI)**: https\://api-gateway.sandbox.ngenius-payments.com/identity/auth/access-token

## Headers:

Add these headers to your request (note that you should replace '*your\_api\_key*' with the service account API key in the [Getting started](https://docs.ngenius-payments.com/reference/getting-started-direct) section).

| Header        | Value                               |
| :------------ | :---------------------------------- |
| Content-Type  | application/vnd.ni-identity.v1+json |
| Authorization | Basic *your\_api\_key*              |

**Example response (body)**:

```json
{
  "access_token": "eyJhbGciOiJSUzI1N…0eDloZnVRI",
  "expires_in": 300,
  "refresh_expires_in": 1800,
  "refresh_token": "eyJhbGciOi…eDloZnVRIn0",
  "token_type": "bearer"
}
```

**Note**: you will require the *access\_token* value for any subsequent calls to the N-Genius Online platform APIs.