Authentication
Overview
Authentication Headers
What is an API Secret and Why Must It Be Stored Securely?
1.
2.
3.
Generating X-Signature and X-Timestamp
<HTTP_METHOD>\n<PATH_WITH_QUERY>\n<TIMESTAMP>\n<BODY>
Postman
Java
Explanation:
1.
2.
The string is constructed by concatenating:
Each component is separated by a newline (\n).
3.
Using Java's Mac and SecretKeySpec, the code calculates the HMAC-SHA256 signature from the string to sign and converts the resulting byte array to a hexadecimal string.
4.
The example uses Java 11’s HttpClient to create and send an HTTP POST request. The required headers (X-API-Key, X-Timestamp, and X-Signature) are attached to the request.

Modified at 2025-02-14 23:36:12