HMAC SHA-256 signature generated using the API Secret Key to secure the request.
When using the API, ensure to include your API Key and generate the signature for the request payload using your API Secret. The tables provided above contain example values for illustration purposes only. Please refer to the code snippets for detailed instructions on how to sign the request and generate the signature properly.
Code Snippet
importaxiosfrom"axios";import{createHmac}from"node:crypto";// Replace with your API Key and SecretconstapiKey="your-api-key";constapiSecret="your-api-secret";// No query parametersconstqueryParams="{}";// Create the HMAC SHA-256 signatureconstsignature=createHmac("sha256",apiSecret).update(queryParams).digest("hex");// Define headersconstheaders={"X-TLP-APIKEY":apiKey,"X-TLP-SIGNATURE":signature};// Send the GET requestaxios.get("https://api.tylt.money/common/getCountriesList",{headers}).then((response)=>{console.log("Response:",response.data);}).catch((error)=>{console.error("Error:",error.response?error.response.data:error.message );});
Response
The response has been truncated for brevity. Only the first 10 countries are shown.