הבדלים בין גרסאות בדף "VoIPe SMS API"
מתוך wiki.voipe.co.il
| שורה 6: | שורה 6: | ||
=== פרמטרים === | === פרמטרים === | ||
בטבלה הבאה מפורטים הפרמטרים של ה webservices למשימות אינדיווידואליות. | בטבלה הבאה מפורטים הפרמטרים של ה webservices למשימות אינדיווידואליות. | ||
| − | |||
{|border="1" | {|border="1" | ||
| − | |||
|- | |- | ||
!שם | !שם | ||
!תיאור | !תיאור | ||
| + | |- | ||
|h | |h | ||
|webservices token, configured by user from Preferences menu | |webservices token, configured by user from Preferences menu | ||
|- | |- | ||
|u | |u | ||
| − | | | + | |שם משתמש |
|- | |- | ||
|p | |p | ||
| − | | | + | |password, supplied for op=get_token |
| − | } | + | |- |
| + | |op | ||
| + | |operation or type of action | ||
| + | |- | ||
| + | |format | ||
| + | |output format selection | ||
| + | |- | ||
| + | |from | ||
| + | |SMS sender ID (for op=pv) | ||
| + | |- | ||
| + | |to | ||
| + | |destination numbers may use commas | ||
| + | |- | ||
| + | |footer | ||
| + | |SMS footer (for op=pv) | ||
| + | |- | ||
| + | |nofooter | ||
| + | |remove SMS footer | ||
| + | |- | ||
| + | |msg | ||
| + | |message (+ or %20 for spaces, urlencode for non ascii chars) | ||
| + | |- | ||
| + | |schedule | ||
| + | |schedule message delivery, format: YYYY-MM-DD hh:mm:ss | ||
| + | |- | ||
| + | |type | ||
| + | |message type (flash or text) | ||
| + | |- | ||
| + | |unicode | ||
| + | |whether message unicode or not (1=unicode, 0=not unicode) | ||
| + | |- | ||
| + | |queue | ||
| + | |queue code | ||
| + | |- | ||
| + | |src | ||
| + | |sender number or ID | ||
| + | |- | ||
| + | |dst | ||
| + | |destination number (single number) | ||
| + | |- | ||
| + | |dt | ||
| + | |send SMS date/time | ||
| + | |- | ||
| + | |smslog_id | ||
| + | |SMS Log ID | ||
| + | |- | ||
| + | |last | ||
| + | |last SMS log ID (this number not included on result) | ||
| + | |- | ||
| + | |c | ||
| + | |number of delivery status that will be retrieved | ||
| + | |- | ||
| + | |kwd | ||
| + | |Keyword | ||
| + | |- | ||
| + | |login_key | ||
| + | |login key sets by admin through webservices call op=loginkeyset | ||
| + | |- | ||
| + | |query | ||
| + | |query server for useful information | ||
| + | |} | ||
| + | === קודי החזרה === | ||
| + | Below table listed return coded after unsuccessful call to a webservices operation. Successful operation will returns an OK data in the response message. | ||
| + | Please note that by default the response message is a JSON encoded message. | ||
| + | {|border="1" | ||
| + | |- | ||
| + | !קוד שגיאה | ||
| + | !תיאור | ||
| + | |- | ||
| + | |ERR 100 | ||
| + | |אימות נכשל | ||
| + | |- | ||
| + | |ERR 101 | ||
| + | |type of action is invalid or unknown | ||
| + | |- | ||
| + | |ERR 102 | ||
| + | |one or more field empty | ||
| + | |- | ||
| + | |ERR 103 | ||
| + | |not enough credit for this operation | ||
| + | |- | ||
| + | |ERR 104 | ||
| + | |webservice token is not available | ||
| + | |- | ||
| + | |ERR 105 | ||
| + | |webservice token not enable for this user | ||
| + | |- | ||
| + | |ERR 106 | ||
| + | |webservice token not allowed from this IP address | ||
| + | |- | ||
| + | |ERR 200 | ||
| + | |send message failed | ||
| + | |- | ||
| + | |ERR 201 | ||
| + | |destination number or message is empty | ||
| + | |- | ||
| + | |ERR 400 | ||
| + | |no delivery status available | ||
| + | |- | ||
| + | |ERR 401 | ||
| + | |no delivery status retrieved and SMS still in queue | ||
| + | |- | ||
| + | |ERR 402 | ||
| + | |no delivery status retrieved and SMS has been processed from queue | ||
| + | |- | ||
| + | |ERR 501 | ||
| + | |no data returned or result is empty | ||
| + | |- | ||
| + | |ERR 600 | ||
| + | |admin level authentication failed | ||
| + | |- | ||
| + | |ERR 601 | ||
| + | |inject message failed | ||
| + | |- | ||
| + | |ERR 602 | ||
| + | |sender id or message is empty | ||
| + | |- | ||
| + | |ERR 603 | ||
| + | |account addition failed due to missing data | ||
| + | |- | ||
| + | |ERR 604 | ||
| + | |fail to add account | ||
| + | |- | ||
| + | |ERR 605 | ||
| + | |account removal failed due to unknown username | ||
| + | |- | ||
| + | |ERR 606 | ||
| + | |fail to remove account | ||
| + | |- | ||
| + | |ERR 607 | ||
| + | |set parent failed due to unknown username | ||
| + | |- | ||
| + | |ERR 608 | ||
| + | |fail to set parent | ||
| + | |- | ||
| + | |ERR 609 | ||
| + | |get parent failed due to unknown username | ||
| + | |- | ||
| + | |ERR 610 | ||
| + | |fail to get parent | ||
| + | |- | ||
| + | |ERR 611 | ||
| + | |account ban failed due to unknown username | ||
| + | |- | ||
| + | |ERR 612 | ||
| + | |fail to ban account | ||
| + | |- | ||
| + | |ERR 613 | ||
| + | |account unban failed due to unknown username | ||
| + | |- | ||
| + | |ERR 614 | ||
| + | |fail to unban account | ||
| + | |- | ||
| + | |ERR 615 | ||
| + | |editing account preferences failed due to missing data | ||
| + | |- | ||
| + | |ERR 616 | ||
| + | |fail to edit account preferences | ||
| + | |- | ||
| + | |ERR 617 | ||
| + | |editing account configuration failed due to missing data | ||
| + | |- | ||
| + | |ERR 618 | ||
| + | |fail to edit account configuration | ||
| + | |- | ||
| + | |ERR 619 | ||
| + | |viewing credit failed due to missing data | ||
| + | |- | ||
| + | |ERR 620 | ||
| + | |fail to view credit | ||
| + | |- | ||
| + | |ERR 621 | ||
| + | |adding credit failed due to missing data | ||
| + | |- | ||
| + | |ERR 622 | ||
| + | |fail to add credit | ||
| + | |- | ||
| + | |ERR 623 | ||
| + | |deducting credit failed due to missing data | ||
| + | |- | ||
| + | |ERR 624 | ||
| + | |fail to deduct credit | ||
| + | |- | ||
| + | |ERR 625 | ||
| + | |setting login key failed due to missing data | ||
| + | |- | ||
| + | |ERR 626 | ||
| + | |fail to set login key | ||
| + | |} | ||
| + | There might appear new error codes in the future, you should be aware that new codes might appear in this syntax: | ||
| + | {|border="1" | ||
| + | |- | ||
| + | !קוד שגיאה | ||
| + | !תיאור | ||
| + | |- | ||
| + | |ERR 1xx | ||
| + | |authentication or parameter erorrs | ||
| + | |- | ||
| + | |ERR 2xx | ||
| + | |specific pv errors | ||
| + | |- | ||
| + | |ERR 4xx | ||
| + | | delivery status errors | ||
| + | |- | ||
| + | |ERR 5xx | ||
| + | |Others | ||
| + | |- | ||
| + | |ERR 6xx | ||
| + | |administrative tasks | ||
|} | |} | ||
גרסה מ־19:01, 8 במרץ 2021
הסבר על פרוטוקול VoIPe SMS Webservices
גישה
Webservices URL: http://sms.voipe.co.il/index.php?app=ws
פרמטרים
בטבלה הבאה מפורטים הפרמטרים של ה webservices למשימות אינדיווידואליות.
| שם | תיאור |
|---|---|
| h | webservices token, configured by user from Preferences menu |
| u | שם משתמש |
| p | password, supplied for op=get_token |
| op | operation or type of action |
| format | output format selection |
| from | SMS sender ID (for op=pv) |
| to | destination numbers may use commas |
| footer | SMS footer (for op=pv) |
| nofooter | remove SMS footer |
| msg | message (+ or %20 for spaces, urlencode for non ascii chars) |
| schedule | schedule message delivery, format: YYYY-MM-DD hh:mm:ss |
| type | message type (flash or text) |
| unicode | whether message unicode or not (1=unicode, 0=not unicode) |
| queue | queue code |
| src | sender number or ID |
| dst | destination number (single number) |
| dt | send SMS date/time |
| smslog_id | SMS Log ID |
| last | last SMS log ID (this number not included on result) |
| c | number of delivery status that will be retrieved |
| kwd | Keyword |
| login_key | login key sets by admin through webservices call op=loginkeyset |
| query | query server for useful information |
קודי החזרה
Below table listed return coded after unsuccessful call to a webservices operation. Successful operation will returns an OK data in the response message. Please note that by default the response message is a JSON encoded message.
| קוד שגיאה | תיאור |
|---|---|
| ERR 100 | אימות נכשל |
| ERR 101 | type of action is invalid or unknown |
| ERR 102 | one or more field empty |
| ERR 103 | not enough credit for this operation |
| ERR 104 | webservice token is not available |
| ERR 105 | webservice token not enable for this user |
| ERR 106 | webservice token not allowed from this IP address |
| ERR 200 | send message failed |
| ERR 201 | destination number or message is empty |
| ERR 400 | no delivery status available |
| ERR 401 | no delivery status retrieved and SMS still in queue |
| ERR 402 | no delivery status retrieved and SMS has been processed from queue |
| ERR 501 | no data returned or result is empty |
| ERR 600 | admin level authentication failed |
| ERR 601 | inject message failed |
| ERR 602 | sender id or message is empty |
| ERR 603 | account addition failed due to missing data |
| ERR 604 | fail to add account |
| ERR 605 | account removal failed due to unknown username |
| ERR 606 | fail to remove account |
| ERR 607 | set parent failed due to unknown username |
| ERR 608 | fail to set parent |
| ERR 609 | get parent failed due to unknown username |
| ERR 610 | fail to get parent |
| ERR 611 | account ban failed due to unknown username |
| ERR 612 | fail to ban account |
| ERR 613 | account unban failed due to unknown username |
| ERR 614 | fail to unban account |
| ERR 615 | editing account preferences failed due to missing data |
| ERR 616 | fail to edit account preferences |
| ERR 617 | editing account configuration failed due to missing data |
| ERR 618 | fail to edit account configuration |
| ERR 619 | viewing credit failed due to missing data |
| ERR 620 | fail to view credit |
| ERR 621 | adding credit failed due to missing data |
| ERR 622 | fail to add credit |
| ERR 623 | deducting credit failed due to missing data |
| ERR 624 | fail to deduct credit |
| ERR 625 | setting login key failed due to missing data |
| ERR 626 | fail to set login key |
There might appear new error codes in the future, you should be aware that new codes might appear in this syntax:
| קוד שגיאה | תיאור |
|---|---|
| ERR 1xx | authentication or parameter erorrs |
| ERR 2xx | specific pv errors |
| ERR 4xx | delivery status errors |
| ERR 5xx | Others |
| ERR 6xx | administrative tasks |