HTTP Profile API

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/http/me
                                
                            
Parameters
Parameter Required Description
api_token
Yes
API Token From Developers option. Get API Token
Accept
Yes
Set to application/json
Content-Type
Yes
Set to application/json
View sms unit

API Endpoint

                                
                                    https://www.opensms.co.ke/api/http/balance
                                
                            
Example request
                                
curl -X GET https://www.opensms.co.ke/api/http/balance \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"YOUR_API_KEY"}'
                                
                            
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/http/me
                                
                            
Example request
                                
curl -X GET https://www.opensms.co.ke/api/http/me \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"api_token":"YOUR_API_KEY"}'
                                
                            
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."
}