Authentication
API Key
ANT APIs use API keys for authentication. An API key is a token that a client provides when making API calls. The key should be sent as a request body named authSecret
POST /user/account/balance HTTP/1.1
Host: api.antgst.com
Content-Type: application/json
{
"authSecret": "YOUR_API_KEY"
}
📘How do I get my API Key?
Log in to ANT Dashboard > SecurityCenter>AccessKeyManage and you will find it on that page.


Test with cURL
cURL is a command-line tool and library for transferring data with URLs. Here is an example of how to retrieve your account balance authenticated with your API key:
curl --location --request POST 'https://api.antgst.com/user/account/balance'
--header 'Content-Type: application/json'
--data '{"authSecret": "YOUR_API_KEY"}'
It returns a response with HTTP status 200
if succeeded. Here is an example of the response body:
{
"msg": "SUCCESS",
"code": 200,
"result": {
"smsBalance": -18.383,
"voipBalance": 0.0,
"currency": "CNY"
}
}
Otherwise, if the API key is invalid. Here is an example of the response body:
{
"msg": "auth secret error!",
"code": -22
}
Last updated