Blog

Start sending SMS using our API | Method 2 | Simple Integration – authentication token send via request parameters

Integrate SMS functionality into your application using your programming language.

Base URL

All URLs referenced in the API documentation have the following base url.

https://portal.richmo.lk
Note : All the query string parameters in the URL must be UTF-8 URL Encoded

Send a single message

HTTP request

GET /api/v1/sms/send/

Parameters

Parameter Type Description Required
dst String Recipent phone number. Required
from String The Sender name.(Mask) Required
msg String The body of the message. Required
key String Authentication token Required

Returns

Code Description Message Example
200 Success { “message”: “success”, “id”: 69412 }
400 Bad Request such as missing required parameter. { “errors”: { “destination”: [ “This field may not be blank.” ] } }
401 Unauthorized : Errors like invalid token { “detail”: “Invalid token.” }

Code Samples

Curl

curl --request GET 'https://portal.richmo.lk/api/sms/send/?dst=947xxxxxxxx&from=[mask]&msg=[UTF-8 URL Encoded Message]&key=[API TOKEN]'

PHP Curl

$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://portal.richmo.lk/api/sms/send/?dst=947xxxxxxxx&from=[mask]&msg=[UTF-8 URL Encoded Message]&key=[API TOKEN]',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                         

Python-Request

import requests

url = "https://portal.richmo.lk/api/sms/send/?dst=947xxxxxxxx&from=[mask]&msg=[Your Message]&key=[API TOKEN]"
payload={}
headers = {}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)

 

ABOUT THE AUTHOR

RELATED POST

Leave a Reply

Your email address will not be published. Required fields are marked *

SAFE SHIPPING

Track Your Item Live

ONLINE PAYMENT

Payment Methods

24/7 CUSTOMER SUPPORT

Unlimited help desk.

CREATIVE DESIGNS

Free Designs for You

TRUSTED SERVICES

For Your All Orders

Shopping cart
Sign in

No account yet?

We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies.
Home
Shop
0 Wishlist
0 items Cart
My account