Skip to main content
All API requests must include a digital signature to ensure authenticity and data integrity. Unless otherwise specified, include the signature in the HTTP header:

How signature generation works

  1. Collect request parameters
  2. Sort parameters by name
  3. Append your client_key
  4. Hash the final string
  5. Send the signature in the request header

Step 1: Sort parameters

Sort all request parameters by parameter name in ASCII ascending order. Example: Sorted result:

Step 2: Append your client key

Append your secret client_key to the end of the string. If:
Result:

Step 3: Hash the string

Hash the final string. SHA256 is recommended.
MD5 may be required by certain channels — follow the API specification.
Example:

Step 4: Add signature to header

Include the hash result in the request header:

Important Rules

  • Sort parameters alphabetically by name.
  • Do not include empty or null parameters.
  • Do not include the signature itself in the signing string.
  • Parameter names and values are case-sensitive.
  • Use UTF-8 encoding when building the string.
  • Do not include spaces, line breaks, or extra characters.
Include mchid in the signature only if it is part of the request parameters.

Example (Node.js)