Get Wallet Address
Last updated
GET /whitelabel/wallet/getWalletAddress?externalUserId=user-10021¤cy=USDT&network=TRON{
"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": "1",
"networkSymbol": "TX"
}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: '1',
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));{
"msg": "",
"data": {
"publicAddress": "TTnUAQaRyhZQdJJZi4Zhc9saUbMqta7Gng"
}
}