URL: https://www.dreams.sa/index.php/api/Register/
Parameters |
|
---|---|
Parameter | Description |
user | Account Username |
password | Account Password |
name | Account Name |
mobile | Account Mobile |
Account Email | |
Response Codes |
|
Code | Description |
999 | Success register user |
100 | Missing parameters |
110 | Username already used |
111 | Mobile already used |
112 | Email already used |
120 | Username contains special characters or Arabic characters |
121 | Password less than 6 characters |
122 | Invalid username |
123 | Invalid password |
URL: https://www.dreams.sa/token/generate
Parameters |
|
---|---|
grant_type | Must be set to "client_credentials" |
client_id | Your client ID |
client_secret | Your client secret |
Successful Response (200 OK) |
|
|
|
Error Responses |
|
Invalid Client (401) |
|
Invalid Grant Type (400) |
|
Response Details:
- token_type: Always "Bearer"
- expires_in: Token validity period in seconds (1 hour = 3600 seconds)
- access_token: JWT token to be used for subsequent API calls
URL: https://www.dreams.sa/index.php/api/activate
Parameters |
|
---|---|
user | Account Username |
secret_key | API Secret Key |
code | Activation Code |
Response Codes |
|
999 | Success activate account |
100 | Missing parameters |
110 | Wrong username or secret key |
111 | Wrong activation code |
URL: https://www.dreams.sa/index.php/api/chk_user/
Parameters |
|
---|---|
user | Account Username |
secret_key | API Secret Key |
Response Codes |
|
999 | Valid account |
-100 | Missing parameters |
-110 | Account not exist (wrong username or secret key) |
-111 | Account not activated |
-112 | Blocked account |
URL: https://www.dreams.sa/index.php/api/chk_balance/
Parameters |
|
---|---|
user | Account Username |
secret_key | API Secret Key |
Response Codes |
|
Number | The balance |
-100 | Missing parameters |
-110 | Account not exist (wrong username or secret key) |
URL: https://www.dreams.sa/index.php/api/newsender/
Parameters |
|
---|---|
user | Account Username |
secret_key | API Secret Key |
sendertext | Sender text |
Response Codes |
|
999 | success operation |
-100 | Missing parameters |
-110 | invalid user name and secret_key |
-113 | sender text duplicated |
-114 | invalid sender Text "sender text have wrong character or more then 11 char ore number and more 14 number" |
URL: https://www.dreams.sa/index.php/api/senderstatus/
Parameters |
|
---|---|
user | Account Username |
secret_key | API Secret Key |
sendertext | Sender Text |
Response Codes |
|
999 | Sender Text is Active |
-100 | Missing parameters |
-110 | invalid user name and secret_key |
-116 | sender text not found in user sender list |
-117 | sender text inactive |
-118 | sender text rejected |
URL: https://www.dreams.sa/index.php/api/usersender/
Parameters |
|
---|---|
user | Account Username |
secret_key | API Secret Key |
Response Codes |
|
<usersender>
<sender> <senderdetails> <id>52</id> <text>.,:?-_@</text> <status>UnActive</status> <default>false</default> <date>2011-03-21</date> <notes>test test</notes> </senderdetails> </sender> <sender> </sender> <usersender> |
success Result |
<error>
<Code>-110</Code> <Description>User name and secret_key Wrong </Description> </error> |
User name and secret_key Wrong |
<error>
<Code>-110</Code> <Description>Missing parameters </Description> </error> |
Missing parameters |
<error>
<Code>-117</Code> <Description>No Snder for This Use </Description> </error> |
No Snder for This Use |
URL: https://www.dreams.sa/index.php/api/sendsms/
Parameters |
|
---|---|
user | Account Username |
secret_key | API secret key |
to | Recipient Mobile Number |
message | Message Texts |
sender | Sender name |
is_calander (Optional) | will be 1 if you want to extract url in calendar then will enter (calander_date,calander_time,reminder && reminder_text) |
calander_date (required if is_calander=1) | ENTER calander date |
calander_time (required if is_calander=1) | ENTER calander time |
reminder (Optional) | ENTER reminder before few minutes |
reminder_text (Optional) | ENTER reminder Text |
location_url (Optional) | ENTER location url From Google map |
Response Codes |
|
Result:SMS_ID:mobileNumber | Result :1 (Success sent ) |
-100 | Missing parameters (not exist or empty) user + pass + to + message + sender |
-110 | Wrong username or secret_key |
-111 | The account not activated |
-112 | Blocked account |
-113 | not enough balance |
-114 | The service not available for now |
-115 | The sender not available (if user have no opened sender) Note : if the sender opened will allow any sender |
-116 | Invalid sender name |
-117 | Check your number. There some problem |
-118 | Unwanted error |
-119 | Later date time is not correct |
-122 | Number not allow |
-123 | The sender's name has exceeded the maximum daily sending limit |
-124 | Ip not allow |
URL: https://www.dreams.sa/index.php/api/sendsms_multi/
Parameters |
|
---|---|
user | Account Username |
secret_key | API secret key |
sender | Sender name |
to | Recipients Mobile Numbers With Message Like {"966********":"MSG1","966********":”MSG2"} |
Response Codes |
|
Result:SMS_ID:mobileNumber | Result :1 (Success sent ) |
-100 | Missing parameters (not exist or empty) user + pass + to + message + sender |
-110 | Wrong username or secret_key |
-111 | The account not activated |
-112 | Blocked account |
-113 | not enough balance |
-114 | The service not available for now |
-115 | The sender not available (if user have no opened sender) Note : if the sender opened will allow any sender |
-116 | Invalid sender name |
-117 | Check your number. There some problem |
-118 | Unwanted error |
-119 | Later date time is not correct |
-122 | Number not allow |
-123 | The sender's name has exceeded the maximum daily sending limit |
-124 | Ip not allow |