Balance API

Last updated: Jan 22nd, 2017

Check Balance

Call this API to find out how many balance you have left

Endpoint:

https://api.esms.com.my/sms/balance

Method:

POST, supported content-type are:

  • application/x-www-form-urlencoded
  • application/json
Parameters:
Name Type Required Description
user String Mandatory This would be your account's username.
pass String Mandatory This would be your account's password.
Response:

Response would be returned in application/json format.

An example of Successful response would be:

{"status":0,"balance":279974,"message":"ok","id":"d0f95b49-f1f8-4a85-b713-505d45b45568"}

An example of Failed response would be:

{"status":1,"balance":0,"message":"Incomplete request, please make sure all mandatory parameter exists","id":"1ffc4d7d-ac37-41b5-b649-bb1cb44cb147"}

Name Type Description
status Numeric Status code of the request, kindly refer to below Status mapping table for more details
message String A short description of given status, for more information you may contact our support team at support@esms.com.my
id String ID of this particular request, not very useful but in case if you'd like to raise us any issue, you may include this ID for our reference.
balance Numeric Your account's credit balance.
Response Status Code:
Status Code Description
0Success.
1Insufficient parameters
Please make sure all mandatory parameter exists.
2Invalid calling IP
You are getting this error because you've previously requested your account to be able to call only from certain IP, and you're not calling from the designated IP.
3Invalid username/password combination.
If you believe this is an error, kindly contact our support team at support@esms.com.my.
6Internal error
You may retry again shortly.