Skip to main content

Sending an SMS

To send an SMS, replace the following variables in the example below:

SENDLIME_API_KEYYour SendLime API key (see it on your dashboard).
SENDLIME_API_SECRETYour SendLime API secret (see it on your dashboard).
SENDLIME_BRAND_NAMEThe registered brand or purchased number.
TO_NUMBERThe phone number you are sending the message to.

HTTP requests to the API are protected with HTTP Basic authentication.

User your API Key as the username and your API Secret as the password for HTTP Basic authentication.

Write the code

Add the following to

curl -X "POST" "" \
-d "text=A text message sent using the SendLime API" \
-d "to=$TO_NUMBER" \

If you don't have any approved brand or any purchased number, you don't need to pass from. We will send the SMS from a random number.

Run your code

Save this file to your machine and run it:


Try it out

When you run the example above, the text message will be sent to the mobile number that you specified.


As per the BTRC guidelines, promotional messages have to be in Bangla.