Documentation
Getting Started
API Reference
SMS API
Contacts API
OTP API
Voice API
MMS API
WhatsApp API
Viber API
HTTP API
HTTP Endpoints
HTTP SMS API
Profile API Documentation
Profile API
OPENSMS Profile API allows you to retrieve your total remaining sms unit, used sms unit, and your profile information.
API Endpoint
https://www.opensms.co.ke/api/v3/me
Parameters
| Parameter | Required | Description |
|---|---|---|
| Authorization |
Yes
|
When calling our API, send your api token with the authentication type set as Bearer (Example: Authorization: Bearer {api_token}) |
| Accept |
Yes
|
Set to application/json |
View sms unit
API Endpoint
https://www.opensms.co.ke/api/v3/balance
Example request
curl -X GET https://www.opensms.co.ke/api/v3/balance \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns
Returns a contact object if the request was successful.
{
"status": "success",
"data": "sms unit with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}
View Profile
API Endpoint
https://www.opensms.co.ke/api/v3/me
Example request
curl -X GET https://www.opensms.co.ke/api/v3/me \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns
Returns a contact object if the request was successful.
{
"status": "success",
"data": "profile data with all details",
}
If the request failed, an error object will be returned.
{
"status": "error",
"message" : "A human-readable description of the error."
}