πAuthorization
This page describes how to authenticate your requests to Groups API
// Get the access and secret from environment variables
const access = pm.variables.get("x2-access-key");
const secret = pm.variables.get("x2-secret-key");
// Combine them into a single string with '|'
const str = access + '|' + secret;
// Compute the SHA256 hash of the combined string
const hash = CryptoJS.SHA256(str).toString(CryptoJS.enc.Hex);
// Set the Authorization header with 'Bearer {hash}'
request.headers.set({ key: 'Authorization', value: 'Bearer ' + access + '|' + hash });Last updated