Loading...

EBulkSMS GET API


With our HTTP GET API you only need to send a message using simple URL parameters.

This is excellent if you want to integrate into mobile apps, games, and legacy applications.

First you need to create your account on EBulkSMS in order to start using our API right away. Click here to create your account now.

Once you have your account setup you will be able to start sending GET requests to our API in the format below

https://api.ebulksms.com:8080/sendsms?username=your_email_address&apikey=your_apikey&sender=your_sender_name&messagetext=your_message&flash=0/1&recipients=23480...,23470...

You need to enter the actual values for username, apikey, sender, messagetext, flash, and recipients.

Now you only have to make a request to the generated URL above using basic a HTTP GET request.

You could paste the URL in your browser to test it.

 

Here is a description of the parameters used in the URL above

Name Description
username Your login username on eBulkSMS (same as your email address)
apikey This is generated for you here.
sender

Your chosen sender name

Alphanumeric sender name: Maximum of 11 characters

Numeric sender name: Maximum of 14 characters

messagetext

The text message you wish to send

Single page message is 160 characters

Maximum of 4 pages with 612 characters

flash

0 - for normal SMS.

1 - for flash text (Only displays on the screen and will not be saved to the recipients phone)

recipients

Recipient’s mobile number in full international format

You can send to multiple numbers by separating them with a comma ( , ) only.

 

Please note that if you are on a shared hosting server you may have to send a request to your hosting company to open outgoing connections on port 8080 to api.ebulksms.com Here is a sample message you can send.


Dear Web Hosting Team,
Please I need access to the API on www.ebulksms.com
The API runs on port 8080. 
Kindly grant my request by opening outgoing connections to api.ebulksms.com on port 8080.
Thanks.
    
 

API Responses


The following responses will indicate if your message was received - success, or if there was an error in your request - failure.

Importantly, you must be aware that errors that have to do with recipient numbers are permanent and such messages should not be resent.

For errors relating to the message format and actual message you could modify the message and resend it.

The same applies to the sender name. As much as possible avoid using special characters in the sender name.

 
Status Description
INVALID_REQUEST The URL format is not valid.
MISSING_USERNAME Username field is empty
MISSING_APIKEY API Key field is empty
AUTH_FAILURE The username and API key combination is not correct.
MISSING_SENDER Sender name is empty
MISSING_MESSAGE Empty message content
MISSING_RECIPIENT No mobile phone number was found
INVALID_RECIPIENT An invalid mobile phone number was found
INVALID_MESSAGE Message is either too long or contains characters that cannot be sent.
INVALID_SENDER The sender name entered is not valid or is missing.
INSUFFICIENT_CREDIT Your account balance is too low to send the message.
UNKNOWN_CONTENTTYPE Check you post method to ensure there is a content-type header. Applies mostly to JSON and XML.
UNKNOWN_ERROR Rarely used - Errors in data specification / headers.
SUCCESS Your message was received successfully.
 

Response Format

Since we are using the GET API, each of the above responses would be sent back in plain text as shown below.

//When there’s an error you only get a status string.
STATUS_STRING

//for successful requests you will receive:
STATUS_STRING|totalsent:{total number of valid recipients}|cost:{number of units used}
 

Checking SMS Credit Balance


You may check your SMS balance using the API with a simple HTTP GET request. Just make a request to this URL:

https://api.ebulksms.com/balance/username/apikey

Here you will replace username and apikey with your username(email) and generated API key respectively.


For sample code on how to implement this in PHP please click here.


You may download this API documentation here.