> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.nibtravelinsurance.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.nibtravelinsurance.com/_mcp/server.

# Authorization

nib Travel API access is via a Bearer token authorization set in the HTTP Header. To get a bearer token, the [token endpoint](/reference/users-api/authentication/generate-access-token-for-protected-actions-using-credentials) in the users api needs to be called first using the user credentials approach. The below curl request shows the input parameters needed for the [token endpoint](/reference/users-api/authentication/generate-access-token-for-protected-actions-using-credentials)

```
curl --location 'https://api-staging.nibtravelinsurance.com/users/<<brandCode>>/token' 
--data-urlencode 'customerInterfaceId=8' 
--data-urlencode 'userTypeId=4' 
--data-urlencode 'client_id=API' 
--data-urlencode 'grant_type=password' 
--data-urlencode 'username=<<userName@someone.com>>' 
--data-urlencode 'password=<<SomePassword123$>>'
```

The endpoint details for Prod and Staging environments are given below

| Environment | Token Endpoint                                                                                                                             |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Prod        | [https://api.nibtravelinsurance.com/users/\{brandCode}/token](https://api.nibtravelinsurance.com/users/\{brandCode}/token)                 |
| Staging     | [https://api-staging.nibtravelinsurance.com/users/\{brandCode}/token](https://api-staging.nibtravelinsurance.com/users/\{brandCode}/token) |

The possible brand codes are given below. Partner brand codes are also supported:

| Brand                      | Value |
| -------------------------- | ----- |
| World Nomads               | wn    |
| NIB AU                     | nibau |
| NIB New Zealand            | nibnz |
| Travel insurance direct AU | tidau |

The parameter details are given below

| Parameter           | Value    | Description                      |
| ------------------- | -------- | -------------------------------- |
| customerInterfaceId | 8        | 8 represents third party website |
| userTypeId          | 4        | 4 represents partner             |
| client\_id          | API      | API is for external APIs         |
| grant\_type         | password |                                  |
| username            |          | User name of the password        |
| password            |          | Password of the user             |

The response from the above request will give the [access\_token](/access_token).

nib Travel API endpoints can be accessed by passing this  [access\_token](/access_token) value as bearer token in HTTP Headers like this example given below.

```
curl --location 'https://api-staging.nibtravelinsurance.com/endpoint' 
--header 'Authorization: Bearer <<access_token>>' 
```