To using this feature you must have API key. Read at here to know how to get our API key
Get account info by API key
GET
https://api.tronsave.io/v0/user-info
Get account info by api-key
200: OK
Copy {
id : string , //internal account id
balance : string , //internal account balance in sun
represent_address : string , //represent of internal account as requester of order
deposit_address : string ,
}
Example
Success Response
Copy {
"id" : "user_id" ,
"balance" : "1000000" ,
"represent_address" : "TKVSaJQDWeKFSEXmA44pjxduGTxy999999" ,
"deposit_address" : "TKVSaJQDWeKFSEXmA44pjxduGTxy999999" ,
}
Example Code
Javascript cURL
Copy const GetAccountInfo = async (api_key) => {
const url = `https://api.tronsave.io/v0/user-info`
const data = await fetch (url , {
headers : {
'apikey' : api_key
}
})
const response = await data .json ()
/**
* Example response
* @link https://docs.tronsave.io/buy-energy-on-telegram/using-api-key-to/get-internal-account-info
{
"id": "user_id",
"balance": "1000000",
"represent_address": "TKVSaJQDWeKFSEXmA44pjxduGTxy999999",
"deposit_address": "TKVSaJQDWeKFSEXmA44pjxduGTxy999999",
}
*/
return response
}
Copy curl -- location 'https://api.tronsave.io/v0/user-info' \
-- header 'apikey: {{apikey}}'
Last updated 3 months ago