{
"endUserId": 20001, // Optional: Provide one user identifier only
"endUserEmail": "joe@example.com", // Optional: Alternative to endUserId and externalUserId
"externalUserId": "user-10021", // Optional: Alternative to endUserId and endUserEmail
"networkId": 123,
"networkSymbol": "TRX"
}
import crypto from 'crypto';
import axios from 'axios';
const apiKey = 'your-api-key';
const apiSecret = 'your-api-secret';
const queryParams = {
{
endUserId: 20001, // Optional: Provide one user identifier only
endUserEmail: "joe@example.com", // Optional: Alternative to endUserId and externalUserId
externalUserId: "user-10021", // Optional: Alternative to endUserId and endUserEmail
networkId: 123,
networkSymbol: "TRX"
}
const rawPayload = JSON.stringify(queryParams);
const signature = crypto.createHmac('sha256', apiSecret).update(rawPayload).digest('hex');
const headers = {
'x-tlp-apikey': apiKey,
'x-tlp-signature': signature
};
const queryString = new URLSearchParams(queryParams).toString();
axios.get(`https://api.tylt.money/whitelabel/wallet/getWalletAddress?${queryString}`, { headers })
.then(response => console.log(response.data))
.catch(error => console.error('Error:', error.response ? error.response.data : error.message));