For the complete documentation index, see llms.txt. This page is also available as Markdown.

Authenticate Request

Every request is authenticated via verifying signature, payload and apiKey.

Note: Add apiKey, signature and payload in every request header.

Body and payload Mismatch Issue in Postman -

  • The “Body and payload mismatch” issue typically occurs when there’s a mismatch between the keys defined in the Pre-request Script or Params section and the actual keys present in the request body(including unselected parameter).This seems to be related to how the request is configured in Postman, not an issue from our API side. It’s possible that some parameters were left unselected or partially configured while calling the API.

    • Please ensure that either:

      • All parameters are selected before sending the request, or

      • Only the parameters you intend to send are present in the request body.

Sample header to add API key, Signature and Payload

const headers = {
      'apikey': apiKey,
      'payload': payload,
      'signature': signature,
    };

Generate Payload and Signature

const CryptoJS = require('crypto-js');

function generatePayloadAndSignature(secret, body) {
  const timestamp = Date.now().toString();
  const obj = {
    body,
    timestamp
  };
  const payload = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(JSON.stringify(obj)));
  const signature = CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA512(payload, secret));
  return { payload, signature };
}

Postman Pre request Script

AUTHENTICATION ERROR CODE

Error Codes
Error Message

429

Too many requests!

500

Internal server error.

401

Invalid Signature

401

Missing necessary header data

401

Invalid api key

401

Missing timestamp in payload

401

Missing body in payload

401

Timestamp expired

401

Ahead of time

401

Body and Payload mismatch

Last updated