Singolo messaggio
Questo metodo ti permette di mandare un singolo messaggio a un destinatario.
GET
/send
Parametri query
token
richiesto se non presente negli header
|
Il tuo token |
text
richiesto
|
Il messaggio |
to
richiesto
|
Destinatario |
pushtype | Il tipo di invio (alert o marketing ) |
delay | Data d’invio Y-m-d H:i:s |
sender | Ti permette di personalizzare il mittente |
gsmsmsid | Un id di tua scelta per linkare il messaggio alla notifica di ricezione |
Esempio pronto all’uso
Sostituisci your.token con il tuo e sarai pronto per inviare il messaggio. Se non hai ancora creato un token, puoi farlo qui.
https://api.smsfactor.com/send?text=Hello world&to=33612345678&token=your.token
Esempi dettagliati Con il token negli header e anche nell’URL
GET /send?text=Hello world&to=33612345678
Host: api.smsfactor.com
Accept: application/json
Authorization: Bearer your.token
GET /send?text=Hello world&to=33612345678&token=your.token&delay=2023-12-10 10:25:14
Host: api.smsfactor.com
Accept: application/json
Formato della risposta
{
"status": 1,
"message": "OK",
"ticket": "14672468", //The id of your campaign
"cost": 1, //The cost of your campaign
"credits": 642, //Your credits after your campaign has been created
"total": 1, //Number of message before filtering
"sent": 1, //Number of message after filtering
"blacklisted": 0, //Number of blacklisted numbers
"duplicated": 0, //Number of duplicated numbers
"invalid": 0, //Number of invalid numbers
"npai": 0 //Number of npai numbers
}
<response>
<status>1</status>
<message>OK</message>
<ticket>14672468</ticket>
<cost>1</cost>
<credits>642</credits>
<total>1</total>
<sent>1</sent>
<blacklisted>0</blacklisted>
<duplicated>0</duplicated>
<invalid>0</invalid>
<npai>0</npai>
</response>