Most APIs typically use tokens to authenticate users and do not maintain session state between requests. Mobile Sasa provides a full OAuth2 server implementation for your application. We have some endpoints that require tokens to authenticate your requests and some that don’t. On Mobile Sasa you pass the access token to the Authorization header of your HTTP request of the type Bearer token.
First, developers building applications that need to interact with Mobile Sasa API will need to register their application by creating a "client". Typically, this consists of providing the name of their application and a URL that your application can redirect to after users approve their request for authorization. For now, developers should provide the company dormain as the redirect url. When the application is created, Mobile Sasa will provide you with the Client ID and Client Secret that your application will use to request for access tokens. Note that you can create as many clients you need.
The following are parameters some endpoint may require. They are case sensitive.
senderID - this is the sender header for the SMS. By default Mobile Sasa assaigns all users the MOBILESASA Sender ID. If you request us to register you a Sender ID, we will assign that Sender to your account. Your sender IDs are found in the “My SenderIDs” navigation menu
phone - this is the phone number of the recipient of the SMS.
message - the message to the recipient.
api_key - your account api key. This is found on your account “Developer section” navigation menu.
username - your username. This was provided during account registration. You can find it on your Profile.
client_secret - Found in the “Developer section” and it spefic to the application you created.
client_id - Found in the “Developer section” and it spefic to the application you created.
Mobile Sasa Endpoints
Access token column shows whether the endpoint requires Authorization header with access token.
|#||HTTP Method||Endpoint||Description||Access token|
|1||POST||https://account.mobilesasa.com/oauth/token||Generating access token||Generates the token|
|2||POST||https://account.mobilesasa.com/api/post-sms||Send single sms||YES|
|3||POST||https://account.mobilesasa.com/api/express-post||Send single sms without access token||NO|
|4||POST||https://account.mobilesasa.com/api/balance||Returns sms credit balance||NO|
|5||POST||https://account.mobilesasa.com/api/findSms-status||Checks SMS delivery status||YES|
|6||POST||https://account.mobilesasa.com/api/groups||Returns users sms groups||YES|
|7||POST||https://account.mobilesasa.com/api/group/GroupID/add-contact||Adds contact to group||YES|
|8||POST||https://account.mobilesasa.com/api/send-sms/diffMsg-diffPhones||Sends personalized sms||YES|