Python Client
To get the IP to replace the main_url example kindly contact us.
The following methods are for python users.
main_api = "http://main_url/mspaceservice/wr/sms/"
This is the get balance url =
“ http://main_url/mspaceservice/wr/sms/balance /username={username}/password={password}”
,
where username is the value of your username and
password the value of your password.
http://main_url/mspaceservice/wr/sms/balance /username=myusername/password=mypassword
You can test this by pasting in your browser and press enter.
“your sms balance e.g. ‘50’” if you are a subscribed user or “Error 100: Authentication Failure” if your credentials are wrong.
NOTE that your URL format should support URL encoding UTF- 8 . Messages that are not properly formatted may be delivered with incorrectly encoded text or not delivered at all.
The request methods are summarized in the table below:
main_url = http://main_url/mspaceservice/wr/sms/
Method | Url Structure | Url example | Response on success | Response on failure |
---|---|---|---|---|
Query SMS Balance | main_url/balance/username={username}/password={password} |
http://main_url/balance/username=myusername/
|
Your current SMS balance e.g. “50”. | Authentication failure for wrong user credentials or non-existing user. Internal service error if there’s any. |
Send Text |
main_url +sendtext/username= {username}/password ={password}/senderid ={senderId}/recipient ={recipient}/message ={message} |
http://main_url/sendtext/username
|
Send action status and the sent message id
i.e. “[{"messageId": "12345", "responseTime": "2018-06-25 11:12:19:793", "status": "successful"}]” |
Athentication failure, Insufficient Balance, Invalid sender ID or internal service error. |
Query sub-account users | main_url
+ subusers/username ={username}/password ={password} |
http://main_url/subusers/username
|
The username of your sub-account users and their SMS balances respectively i.e. “[{"smsBalance": "20", "subUserName": "subuser1"}, {"smsBalance": "18", "subUserName": "subuser2"}]” “[]” if no subuser exists. |
Authentication failure. |
Query Re-Seller users | main_url
+ resellerclients/username ={username}/password ={password} |
http://main_url/resellerclients/username
|
The username of your clients and their SMS balances respectively i.e. “[{"smsBalance": "20", "clientname": "client1"}, {"smsBalance": "18", "clientname": "client2"}]” “[]” if no user exists. |
Authentication failure. |
Re-Seller users Top-up | main_url
+ resellerclienttopup/username ={username}/password ={password} /clientname ={clientname}/noofsms ={noofsms} |
http://main_url/resellerclienttopup/username
|
Successful Top up of noOfSms SMS to clientname. | Athentication failure, Insufficient Balance,You are not Authorized to make this transaction,Kindly Contact Providers for help, Failed to top up clientname account, Top up not Successful, failed to deduct your account, or internal service error. |
Sub-Account users Top-up | main_url
+ subacctopup/username ={username}/password ={password} /subaccname ={subaccname}/noofsms ={noofsms} |
http://main_url/subacctopup/username
|
Successful Top up of noOfSms SMS to subAccName. | Athentication failure, Insufficient Balance,You are not Authorized to make this transaction,Kindly Contact Providers for help, Failed to top up subAccName account, Top up not Successful, failed to deduct your account, or internal service error. |
System Login | main_url
+ login/username ={username}/password ={password} |
http://main_url/login/username
|
user exists. | Authentication failure. |
Elysee(Ntashart) Plaza, Kilimani Road, 2nd Floor Suite 4A
Kampala, Makerere Hill Road, Ham Towers, 3rd floor, Suite No HT 25