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
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.
Example code in 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