Used to send SMS. Requires user's api_key, recipient phone number and SMS content. After the request, you will get an ID for this sending, which can be used to query the SMS sending status.
https://api.haosms.net/extra_api/otp_msg| Parameter Name | Type | Required | Description |
|---|---|---|---|
api_key | String | Yes | User's unique identifier |
phone | String | Yes | Phone number to receive verification code. Format: 1324638088. Do not add 0086, +86 format not accepted |
content | String | Yes | Verification code. Can only contain numbers and English letters, maximum length 6 characters |
platform | String | Yes | Channel for sending verification code. For example: China OTP Channel 2, China OTP Channel 1 |
tmp_id | String | No | Template ID for verification code message (if not provided, system default OTP template will be used) |
Sample:
{
"msg": "a42739630dbe4daa8d4f5f6a530a35bc",
"result": "成功",
"code": "",
"data": null,
"datas": [],
"name": "extra_api.otp_msg",
"request_id": ""
}https://api.haosms.net/extra_api/otp_msg/?api_key=kknft3xxxx&content=123212&phone=155xxxx827&platform=%E9%AA%8C%E8%AF%81%E7%A0%81%E9%80%9A%E9%81%931Used to query account balance. Requires user's api_key, and returns current account balance information after the request.
https://api.haosms.net/user/s_balance| Parameter Name | Type | Required | Description |
|---|---|---|---|
api_key | String | Yes | User's unique identifier |
Sample:
{
"msg": "",
"result": "True",
"code": "",
"data": {
"balance": 0
},
"datas": [],
"name": "",
"request_id": ""
}https://api.haosms.net/user/s_balance?api_key=yourApiKey