User Tools

Site Tools


api_sms

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

api_sms [2020/08/01 23:02]
127.0.0.1 external edit
api_sms [2020/08/10 19:43]
Line 1: Line 1:
-====== API - Invio SMS tramite http ====== 
-==== Esempio API ==== 
- 
-Per poter utilizzare le API l'utente dovrà abilitare l'accesso e configurare il suo IP nel pannello di configurazione della propria area riservata all'indirizzo: 
-https://www.smskdev.it/playsms 
- 
-eseguito il login accedere dal menù alla sezione 
- 
-Il Mio Account > Configurazione Utente 
- 
-{{:schermata_2014-10-14_alle_22.24.00.png?600|}} 
- 
-Scegliere SI dalla dropdown in corrispondenza dell'opzione "Abilita Webservice" 
-Specificare l'IP o gli IP dai quali saranno lanciate le chiamate nel campo in corripsondeza  
-WebService Ip Range, per aprire il Webservice su tutte le reti specificare *.*.*.* 
- 
-**Per l'invio di un SMS é sufficiente una chiamata HTTPS** 
- 
-**IL TESTO DELL'SMS DEVE ESSERE CODIFICA SECONDO LO STANDARD [[http://www.w3schools.com/tags/ref_urlencode.asp|URLENCODE]] ** 
- 
-** 
-ESEMPIO di chiamata per invio SMS** 
-https://www.smskdev.it/playsms/send.php?user=utente&passkey=utente&to=39XXXXXXXXXX&text=testo%20messaggio 
- 
-OUTPUT DELLA CHIAMATA IN FORMATO JSON 
-<code> 
-stdClass Object 
-( 
-    [data] => Array 
-        ( 
-            [0] => stdClass Object 
-                ( 
-                    [status] => OK 
-                    [error] => 0 
-                    [smslog_id] => 5496 
-                    [queue] => b09035435513302c1beb6a29224c9976 
-                    [to] => 39XXXXXXXX 
-                ) 
- 
-        ) 
- 
-    [error_string] =>  
-    [timestamp] => 1413318506 
-) 
- 
- 
-</code> 
-Come si può vedere nell'esempio il tracciato riporta: 
-  * [status] => OK - Esito dell'accodamento (OK o KO) 
-  * [error] => 0 - Eventuale codice errore 
-  * [smslog_id] => 5496 
-  * [queue] => b09035435513302c1beb6a29224c9976 
-  * [to] => 39XXXXXXXX 
- 
-## Codici di Errore 
- 
-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. 
- 
-|^Error code  ^Description | 
-|            |              | 
-|ERR 100    | authentication failed | 
-|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 | 
- 
  
api_sms.txt · Last modified: 2023/12/29 14:29 (external edit)