MOR API sms send
From Kolmisoft Wiki
Revision as of 13:16, 23 May 2013 by Aisteb (talk | contribs) (moved MOR API send sms to MOR API sms send)
Description
SMS API is used to integrate MOR with other external systems like CRM, ERP or other for SMS sending through them.
Users which can user SMS API:
- Admin
- Reseller
Usage
- Call: /api/sms_send
- Methods: POST, GET(if allowed, not recomended)
Parametres
- lcr_id - LCR ID in MOR database. Required.
- u - username to login. Required.
- dst - Destination number. Required.
- src - Source number. Required.
- message - Message that you want to send. Required.
- hash - SHA1 hash constructed using API_Secret_Key ( More described in Constructing hash). Required.
* Note that message must be in URL Encode
Request
We have lcr_id = 1, dst = 937567337911, src = 9375783123767, message = hi, API key = 123456
- We send:
HTML POST: http://<server_ip>/api/send_sms?u=username&lcr_id=1&dst=937567337911&src=9375783123767&message=hi&hash=cc0e27123e27f08de2fbc68a2c8ba0b213654687
* Note that username and password are not included in hash
Returns
Success
<page> <response> <status>ok</status> <message> <message_id> message id </message_id> <sms_status_code_tip>SMS is sent</sms_status_code_tip> <price> price </price> <currency> currency </currency> </message> </response> </page>
Errors
- <error>There is no message or it is empty</error> – message text not found.
- <error>Wrong source</error> – source number is wrong.
- <error>Wrong destination</error> – destination number is wrong.
- <error>There is no such LCR</error> – LCR id not found.
- <error>User is not subscribed to sms service</error> – user is not Subscribed for sms usage.
- <error>1 - failed, admin does not have rate for this destination</error> - SMS status code and tip SMS Addon - Status codes
- <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
See also