---
title: Authentication
slug: authentication
docTags: 
createdAt: 2023-05-30T21:40:18.000Z
---

### Generating API Keys

1. Fill out the "Request API documentation" form linked on Boom's [Rent Reporting-as-a-Service page.](https://www.boompay.app/rent-reporting-as-a-service)
2. Your request will be reviewed, and you will be emailed and invited to a [Sandbox ](https://portal.sandbox.boompay.app/)and [Production](https://portal.boompay.app/) Boom Partner Platform.
3. In the Boom Partner Platform, navigate to the "Settings" page from the menu on the bottom left and proceed to the **Settings -> API**.
4. In the **API** tab, you will be presented with an **access key** and **secret key**, which you will need to generate. The model prompt will show you your secret key, which will only be shown to you once. Make sure to save this in a secure place.
5. Make sure you have access to Sandbox and Production, and generate keys in both places for your Local and Production environments respectively.

### API Authentication

Every API request to Boom servers must include an authentication **API token.&#x20;**&#x54;oken is a **JWT token** generated with the HS256 algorithm. If you are not familiar with JWT we highly recommend reading more about it [here](https://jwt.io/introduction/).&#x20;

### Get API token

In order to get an API token you must use the **access key** and **secret key&#x20;**&#x66;rom the portal

```curl
curl --location --request POST 'https://api.sandbox.boompay.app/partner/v1/authenticate' \
--header 'Content-Type: application/json' \
--data-raw '{
    "access_key": "sample-access-key",
    "secret_key": "sample-secret-key"
}'
```

### Making requests to Boom API

There 2 ways of setting up authentication. Simplest way is to just pass the **API token** with a bearer header.

```curl
curl --location --request POST 'https://api.sandbox.boompay.app/v1/partners/customers' \
--header 'Authorization: Bearer <API_token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "first_name": "John",
    "last_name": "Doe",
    "email": "uniqueJohnDoe@boompay.app",
    "phone": "12345678910"
}'
```

If enhanced security configuration is enabled, JWT verification secret will be surfaced in the ["Developers"](https://portal.boompay.app/settings/developers)  page and you will have to pass an additional header **X-Access-Token** with an **access\_key** value in addition to **API token.&#x20;**&#x49;n order to enable enhanced security verification please contact Boom.

```curl
curl --location --request POST 'https://api.sandbox.boompay.app/v1/partners/customers' 
--header 'Authorization: Bearer <API_token>' 
--header 'X-Access-Token: <access_key>'
--header 'Content-Type: application/json' 
--data-raw '{
"first_name": "John",
"last_name": "Doe",
"email": "uniqueJohnDoe@boompay.app",
"phone": "12345678910"
}'
```

:::BlockQuote

:::

