---
updatedAt: 2026-07-24T04:14:19.000Z
agentTools:
  projectIndex: https://docs.cermatiprotect.com/llms.txt
---

# Generating Basic Authorization Header

The token is generated using the formula below.

**authorizationHeader** = "Basic " + Base64(*partnerName*, *secretKey*)

* *partnerName* provided by Cermati Protect during integration development
* *secretKey* provided by Cermati Protect during integration development

<Callout icon="📘" theme="info">
  ### The header is valid for as long as the secretKey is valid.
</Callout>

<Callout icon="❗️" theme="error">
  ### Your token carries many privileges, hence please be sure to keep the information secure. Do not share your token in publicly accessible areas such as GitHub, client-side code, and so forth.
</Callout>

Example code in JavaScript:

```javascript
const encBase64 = require('crypto-js/enc-base64');
const HmacSHA256 = require('crypto-js/hmac-sha256');

const partnerName = 'greatpartner';
const secretKey = 'YourSecretKey';
const payload = partnerName + ':' + secretKey;
const authorizationHeader = 'Basic ' + encBase64.stringify(payload);
console.log(authorizationHeader)
// Basic Z3JlYXRwYXJ0bmVyOllvdXJTZWNyZXRLZXkK
```

<br />