FAQ e Domande frequenti

Qual'è il PIN della mia SIM card?

Le nostre SIM card vengono spedite senza codice PIN preimpostato

Le SIM card vengono spedite con qualche logo impresso?

Le nostre SIM card sono spedite senza nessun tipo di grafica o logo (white label card)

È possibile avere un IP Statico Pubblico?

Sì è possibile. Devi modificare il piano della SIM in piattaforma con un piano IP statico pubblico, sono identificati con “IP” alla fine del nome del piano. Per esempio “500MB” è un piano IP dinamico, mentre “500MBIP” è un piano IP statico pubblico.
Un IP statico pubblico permette di ricevere tutto il traffico in ingresso senza limitazioni su porte TCP/UDP.

Quali sono le differenze tra un IP statico pubblico e un IP dinamico?

Un IP dinamico è più sicuro perché le porte TCP/UDP in ingresso sono bloccate e l’IP cambia ad ogni sessione.
Un IP statico invece è utile se devi comunicare con un servizio in host che utilizza la connessione della SIM, per esempio un server, perché il suo IP non cambierà mai.

Qual'è l'APN da configurare per i piani a consumo e prepagati?

Il codice APN è resiot.m2m ed è unico per tutti i Paesi coperti. Questo APN non è valido per i piani IP statico pubblico.

Qual'è l'APN da configurare per i piani IP statico pubblico?

Il codice APN da utilizzare solo per i piani IP statico pubblico è fixedip.m2m ed è unico per tutti i Paesi coperti

Configurazione APN avanzata con PLMN

Alcuni apparati potrebbero avere la necessità di una configurazione dell’APN completa di codice PLMN (Public Land Mobile Network) ovvero con Mobile Country Code (MCC) e Mobile Network Code (MNC). Il nostro PLMN code è 20408, l’APN invece è sempre resiot.m2m per i piani a consumo e prepagati, mentre è fixedip.m2m per i piani con IP statico

Posso cambiare il piano di una SIM?

Puoi modificare il piano di una SIM ogni volta che vuoi senza costi ed in qualsiasi momento. Se passi a un piano più costoso, pagherai solo la differenza tra i due piani nel mese di cambio.

Qual'è la copertura di sim.resiot.io?

Connettiamo oltre 180 Paesi in tutto il mondo! Controlla ora la Copertura nella tua zona!

Quali sono i formati SIM disponibili su sim.resiot.io?

  • SIM Card Business Grade disponibili in formato 2FF, 3FF, 4FF (Mini, Micro, Nano SIM)
  • SIM Card Industrial Grade disponibili in formato 2FF, 3FF (Mini, Micro SIM)
  • ChipSIM disponibili in formato MFF2

Scopri di più sulle caratteristiche dei nostri formati SIM!

Quali sono le dimensioni dei formati 2FF, 3FF, 4FF?

  • 2FF (Mini SIM) : 25mm x 15mm x 0.76mm
  • 3FF (Micro SIM) : 15mm x 12mm x 0.76mm
  • 4FF (Nano SIM) : 12,3 mm × 8,8 mm × 0,67 mm

Cos'è una ChipSIM MFF2?

Una ChipSIM è un modulo SIM che può essere direttamente saldato sulla scheda del dispositivo, senza bisogno di alcuna tessera rimovibile in soli 5x6mm. Scopri di più!

Ho bisogno di una vostra SIM per attivare uno dei vostri piani?

, hai bisogno di una card sim.resiot.io per attivare i nostri piani speciali IoT / M2M

Quali sono i possibili stati della mia SIM card?

Gli stati possibili di una SIM card sono:

ACTIVATION_READY:
E’ lo stato di default con il quale vengono consegnate le SIM, a meno che non sia stato pattuito diversamente nel contratto (ad esempio per contratti postpagati). Lo stato Activation Ready non consente al device di stabilire una connessione dati. Le SIM in questo stato generalmente non vengono considerate fatturabili a meno che non sia diversamente previsto da contratto. Per poter utilizzare una SIM in stato Activation Ready occorre prima attivarla (stato Activated) manualmente o via API.

ACTIVATED:
Una SIM card Activated può stabilire una connessione dati e viene considerata fatturabile.

DEACTIVATED:
Lo stato Deactivated non consente ai device di stabilire connessioni dati. Le SIM in questo stato generalmente non sono considerate fatturabili a meno che non sia diversamente previsto da contratto. Solitamente i device Deactivated sono stati installati ma sono temporaneamente inattivi.

RETIRED:
Lo stato Retired non permette di stabilire connessioni dati. Un device in questo stato generalmente non è considerato fatturabile a meno che non sia diversamente previsto da contratto. Solitamente questo stato viene applicato a device permanentemente inattivi e pronti per essere rimossi dalla rete.

TEST_READY:
Può essere lo stato iniziale in cui vengono spedite le SIM per i contratti postpagati, utile per testare i device prima della commercializzazione. Se vuoi richiedere questo stato iniziale alla consegna delle tue SIM card contattaci.
Lo stato Test Ready consente a un dispositivo di stabilire una connessione dati e utilizzare altri servizi gratuitamente. Le SIM in questo stato non sono considerate fatturabili. Per impostazione predefinita, lo stato Test Ready fornisce a ciascun dispositivo i seguenti servizi, sebbene l’operatore possa configurare questi importi in modo diverso:
– Dati: 20KB
– SMS: 2 messaggi
– Voce: 2 minuti
Non appena il dispositivo raggiunge il limite configurato per qualsiasi servizio (dati, SMS, voce o altro), passa allo stato di destinazione e non sarà più disponibile traffico di prova gratuito per alcun servizio. In genere, lo stato di destinazione per le SIM che superano la soglia Test Ready è Activated.

Come posso richiedere assistenza tecnica o commerciale?

Se sei già cliente e sei già registrato sulla nostra piattaforma apri un ticket qui!

Se non hai ancora delle credenziali contattaci tramite il nostro modulo online. Ti forniremo tutte le informazioni di cui hai bisogno il prima possibile! Contattaci

SMS Invio di SMS MO (da modem a piattaforma)

Per l’invio di SMS MO (mobile originated) dalla tua SIM card verso la piattaforma non è necessario usare un’API dedicata. E’ sufficiente inviare un SMS standard tramite il proprio device (modem) contenente la SIM card al numero 5277 (che rappresenta il numero unico della piattaforma).

Se l’SMS è stato recapitato correttamente, è possibile trovare il suo smsMsgId tramite l’API ricerca SMS ed ottenere i suoi dati tramite l’API get Dettaglio SMS.

Elenco API

API get user API token

Il tuo API token è necessario per eseguire la maggior parte delle API sim.resiot.io

Per ottenerlo, effettua il login alla tua console sim e premi il pulsante blu “Get your API Token” come nell’immagine di seguito

API get Statistiche Globali

Permette di ottenere statistiche globali su tutte le SIM card collegate al tuo account

Esempio

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{"Tag": "stats", "Input": "{}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Parametri di input:
– YOUR_API_TOKEN: è il token API ottenuto seguendo gli step esposti nella FAQ “API get user API Token”

Parametri di output:
– totalsim: il numero totale delle tue SIM card
– activated: il numero delle SIM card in stato Activated
– activation_ready: il numero delle SIM card in stato Activation Ready
– deactivated: il numero delle SIM card in stato Deactivated
– retired: il numero delle SIM card in stato Retired
– test_ready: il numero delle SIM card in stato Test Ready
– traffic: volume totale di traffico dati in MB
– sms: totale degli SMS inviati e ricevuti
– voice: totale dei minuti voce usati
– availablecredit: indica il credito disponibile sull’account
– monthlycharge: indica l’addebito del mese attuale
– err: descrizione dell’errore, se presente

Esempio risposta di output

{
"Output":"{\"totalsim\":10,\"activated\":8,\"activation_ready\":0,\"deactivated\":0,\"retired\":0,\"test_ready\":2,\"traffic\":\"352MB\",\"sms\":0,\"voice\":0,\"availablecredit\":\"€15.00\",\"monthlycharge\":\"€8.75\"}"
}

Complete PHP example

<?php
$api_token = "YOUR_API_TOKEN";
$service_url = 'https://console.sim.resiot.io/api/scene/runwithcallback';
$curl = curl_init($service_url);
$header = array();
$header[] = 'Accept: application/json';
$header[] = 'Grpc-Metadata-Authorization: ' . $api_token;
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
$curl_post_data = array(
"Tag"=> "stats",
"Input"=> "{}"
);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($curl_post_data));
$curl_response = curl_exec($curl);
curl_close($curl);
echo "raw response: <br>" . $curl_response;
$APIOutputObject = json_decode($curl_response, true);
$Output_Value = json_decode($APIOutputObject["Output"], true);
if(array_key_exists("err", $Output_Value)){
echo "Error: " . $Output_Value["err"];
}else{
$totalsim = $Output_Value["totalsim"];
$activated = $Output_Value["activated"];
$activation_ready = $Output_Value["activation_ready"];
$deactivated = $Output_Value["deactivated"];
$retired = $Output_Value["retired"];
$test_ready = $Output_Value["test_ready"];
$traffic = $Output_Value["traffic"];
$sms = $Output_Value["sms"];
$voice = $Output_Value["voice"];
$availablecredit = $Output_Value["availablecredit"];
$monthlycharge = $Output_Value["monthlycharge"];
echo "<br><br><b>PARSED VALUES</b>";
echo "<br>Total SIM Cards: " . $totalsim;
echo "<br>- Activated: " . $activated;
echo "<br>- Activation Ready: " . $activation_ready;
echo "<br>- Deactivated: " . $deactivated;
echo "<br>- Retired: " . $retired;
echo "<br>- Test Ready: " . $test_ready;
echo "<br>Traffic: " . $traffic;
echo "<br>SMS: " . $sms;
echo "<br>Voice Minutes: " . $voice;
echo "<br>Available Credit: " . $availablecredit;
echo "<br>Monthly Charge: " . $monthlycharge;
}
?>

API get Dispositivi

Permette di ottenere una lista di SIM delle tue SIM card

Esempio

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{"Tag": "getdevices", "Input": "{\"limit\":50, \"offset\":0}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Parametri di input:
– YOUR_API_TOKEN: è il token API ottenuto seguendo gli step esposti nella FAQ “API get user API Token”
– limit: è il numero massimo di SIM ottenibili, il massimo valore disponibile è 50
– offset: è l’offset da applicare alla lista di SIM, utile quando non è possibile ottnenere tutte le tue SIM con una singola chiamata API, il valore di default è 0

Parametri di output:
– totalCount: il numero di tutte le tue SIM card
– devices: una lista di SIM, ogni SIM ha un iccid e uno status
– err: descrizione dell’errore, se presente

Esempio risposta di output

{
"Output":"{\"totalCount\":2,\"devices\":[{\"iccid\":\"0000000000000000\", \"status\":\"ACTIVATED\"},{\"iccid\":\"0000000000000001\", \"status\":\"TEST_READY\"}]}"
}

Complete PHP example

<?php
$api_token = "YOUR_API_TOKEN";
$service_url = 'https://console.sim.resiot.io/api/scene/runwithcallback';
$curl = curl_init($service_url);
$header = array();
$header[] = 'Accept: application/json';
$header[] = 'Grpc-Metadata-Authorization: ' . $api_token;
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
$curl_post_data = array(
"Tag"=> "getdevices",
"Input"=> "{\"limit\":50, \"offset\":0}"
);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($curl_post_data));
$curl_response = curl_exec($curl);
curl_close($curl);
echo "raw response: <br>" . $curl_response;
$APIOutputObject = json_decode($curl_response, true);
$Output_Value = json_decode($APIOutputObject["Output"], true);
if(array_key_exists("err", $Output_Value)){
echo "Error: " . $Output_Value["err"];
}else{
$totalCount = $Output_Value["totalCount"];
$devices = $Output_Value["devices"];
echo "<br><br><b>PARSED VALUES</b>";
echo "<br>Total SIM Cards: " . $totalCount;
foreach($devices as $sim){
echo "<br>ICCID: " . $sim["iccid"] . ", Status: " . $sim["status"];
}
}
?>

API get Dettaglio Sim

Permette di ottenere lo stato, l’attuale piano dati e il consumo di una SIM card

Esempio

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{"Tag": "get_sim_details", "Input": "{\"iccid\":\"YOUR_ICCID\"}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Parametri di input:
– YOUR_API_TOKEN: è il token API ottenuto seguendo gli step esposti nella FAQ “API get user API Token”
– iccid: l’ICCID della SIM card

Parametri di output:
– status: lo stato attuale della SIM card
– plan: il piano dati attuale impostato
– datausage: il consumo dati attuale (in MB)
– err: descrizione dell’errore, se presente

Esempio risposta di output

{
"Output":"{\"plan\":\"Pay as you use 1\",\"status\":\"ACTIVATED\",\"datausage\":\"0 MB\"}"
}

Complete PHP example

<?php
$api_token = "YOUR_API_TOKEN";
$service_url = 'https://console.sim.resiot.io/api/scene/runwithcallback';
$curl = curl_init($service_url);
$header = array();
$header[] = 'Accept: application/json';
$header[] = 'Grpc-Metadata-Authorization: ' . $api_token;
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
$curl_post_data = array(
"Tag"=> "get_sim_details",
"Input"=> "{\"iccid\":\"YOUR_ICCID\"}"
);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($curl_post_data));
$curl_response = curl_exec($curl);
curl_close($curl);
echo "raw response: <br>" . $curl_response;
$APIOutputObject = json_decode($curl_response, true);
$Output_Value = json_decode($APIOutputObject["Output"], true);
if(array_key_exists("err", $Output_Value)){
echo "Error: " . $Output_Value["err"];
}else{
$plan = $Output_Value["plan"];
$status = $Output_Value["status"];
$datausage = $Output_Value["datausage"];
echo "<br><br><b>PARSED VALUES</b>";
echo "<br>Plan: " . $plan;
echo "<br>Status: " . $status;
echo "<br>Data Usage: " . $datausage;
}
?>

API Attivazione/Disattivazione SIM

Permette di attivare o disattivare una SIM card

Esempio di ATTIVAZIONE

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{"Tag": "edit_sim", "Input": "{\"iccid\":\"YOUR_ICCID\", \"status\":\"activate\"}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Esempio di DISATTIVAZIONE

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{ \"Tag": "edit_sim", "Input": "{\"iccid\":\"YOUR_ICCID\", \"status\":\"deactivate\"}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Parametri di input:
– YOUR_API_TOKEN: è il token API ottenuto seguendo gli step esposti nella FAQ “API get user API Token”
– iccid: è l’ICCID della sim card da attivare/disattivare
– status: “activate” o “deactivate”

Parametri di output:
– result: indica se l’azione è stata avviata correttamente o se si è verificato un errore, valori possibili: “success”, “error”
– description: se l’azione è andata in errore contiene la descrizione dell’errore, altrimenti indica quale azione è in esecuzione

Esempio risposta di output

{
"Output":"{\"result\":\"success\",\"description\":\"SIM 0000000000000000 in activation, check the SIM status on console.sim.resiot.io\"}"
}

Complete PHP example

<?php
$api_token = "YOUR_API_TOKEN";
$service_url = 'https://console.sim.resiot.io/api/scene/runwithcallback';
$curl = curl_init($service_url);
$header = array();
$header[] = 'Accept: application/json';
$header[] = 'Grpc-Metadata-Authorization: ' . $api_token;
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
$curl_post_data = array(
"Tag"=> "edit_sim",
"Input"=> "{\"iccid\":\"YOUR_ICCID\", \"status\":\"activate\"}"
);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($curl_post_data));
$curl_response = curl_exec($curl);
curl_close($curl);
echo "raw response: <br>" . $curl_response;
$APIOutputObject = json_decode($curl_response, true);
$Output_Value = json_decode($APIOutputObject["Output"], true);
if(array_key_exists("err", $Output_Value)){
echo "Error: " . $Output_Value["err"];
}else{
$result = $Output_Value["result"];
$description = $Output_Value["description"];
echo "<br><br><b>PARSED VALUES</b>";
echo "<br>Result: " . $result;
echo "<br>Description: " . $description;
}
?>

API cambio piano dati SIM

Permette di cambiare il piano dati di una SIM card

Esempio, impostare il piano 100MB

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{"Tag": "edit_sim", "Input": "{\"iccid\":\"YOUR_ICCID\", \"plan\":\"100MB\"}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Parametri di input:
– YOUR_API_TOKEN: è il token API ottenuto seguendo gli step esposti nella FAQ “API get user API Token”
– iccid: è l’ICCID della sim card
– plan: uno dei codici piano disponibili (“Pay as you use 1”, “Pay as you use 2”, “10MB”, “25MB”, “50MB”, “100MB”, “150MB”, “200MB”, “250MB”, “500MB”, “1GB”, “2GB”, “3GB”, “5GB”, “10GB”, “20GB”)

Parametri di output:
– result: indica se l’azione è stata avviata correttamente o se si è verificato un errore, valori possibili: “success”, “error”
– description: se l’azione è andata in errore contiene la descrizione dell’errore, altrimenti indica quale azione è in esecuzione

Esempio risposta di output

{
"Output":"{\"result\":\"success\",\"description\":\"Changing SIM 0000000000000000 plan into 100MB, check the SIM plan on console.sim.resiot.io\"}"
}

Complete PHP example

<?php
$api_token = "YOUR_API_TOKEN";
$service_url = 'https://console.sim.resiot.io/api/scene/runwithcallback';
$curl = curl_init($service_url);
$header = array();
$header[] = 'Accept: application/json';
$header[] = 'Grpc-Metadata-Authorization: ' . $api_token;
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
$curl_post_data = array(
"Tag"=> "edit_sim",
"Input"=> "{\"iccid\":\"YOUR_ICCID\", \"plan\":\"100MB\"}"
);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($curl_post_data));
$curl_response = curl_exec($curl);
curl_close($curl);
echo "raw response: <br>" . $curl_response;
$APIOutputObject = json_decode($curl_response, true);
$Output_Value = json_decode($APIOutputObject["Output"], true);
if(array_key_exists("err", $Output_Value)){
echo "Error: " . $Output_Value["err"];
}else{
$result = $Output_Value["result"];
$description = $Output_Value["description"];
echo "<br><br><b>PARSED VALUES</b>";
echo "<br>Result: " . $result;
echo "<br>Description: " . $description;
}
?>

API Attivazione/Disattivazione SIM + cambio piano dati

Permette di attivare/disattivare una SIM card e contemporaneamente cambiarne il piano dati

Esempio, attivare una SIM card e impostare il piano 100MB

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{"Tag": "edit_sim", "Input": "{\"iccid\":\"YOUR_ICCID\", \"status\":\"activate\", \"plan\":\"100MB\"}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Parametri di input:
– YOUR_API_TOKEN: è il token API ottenuto seguendo gli step esposti nella FAQ “API get user API Token”
– iccid: è l’ICCID della sim card
– status: “activate” o “deactivate”
– plan: uno dei codici piano disponibili (“Pay as you use 1”, “Pay as you use 2”, “10MB”, “25MB”, “50MB”, “100MB”, “150MB”, “200MB”, “250MB”, “500MB”, “1GB”, “2GB”, “3GB”, “5GB”, “10GB”, “20GB”)

Parametri di output:
– result: indica se l’azione è stata avviata correttamente o se si è verificato un errore, valori possibili: “success”, “error”
– description: se l’azione è andata in errore contiene la descrizione dell’errore, altrimenti indica quale azione è in esecuzione

Esempio risposta di output

{
"Output":"{\"result\":\"success\",\"description\":\"Changing SIM 0000000000000000 plan into 100MB, check the SIM plan on console.sim.resiot.io . SIM 0000000000000000 in activation, check the SIM status on console.sim.resiot.io\"}"
}

Complete PHP example

<?php
$api_token = "YOUR_API_TOKEN";
$service_url = 'https://console.sim.resiot.io/api/scene/runwithcallback';
$curl = curl_init($service_url);
$header = array();
$header[] = 'Accept: application/json';
$header[] = 'Grpc-Metadata-Authorization: ' . $api_token;
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
$curl_post_data = array(
"Tag"=> "edit_sim",
"Input"=> "{\"iccid\":\"YOUR_ICCID\", \"status\":\"activate\", \"plan\":\"100MB\"}"
);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($curl_post_data));
$curl_response = curl_exec($curl);
curl_close($curl);
echo "raw response: <br>" . $curl_response;
$APIOutputObject = json_decode($curl_response, true);
$Output_Value = json_decode($APIOutputObject["Output"], true);
if(array_key_exists("err", $Output_Value)){
echo "Error: " . $Output_Value["err"];
}else{
$result = $Output_Value["result"];
$description = $Output_Value["description"];
echo "<br><br><b>PARSED VALUES</b>";
echo "<br>Result: " . $result;
echo "<br>Description: " . $description;
}
?>

SMS API invio di SMS MT (da piattaforma a modem)

Permette di inviare SMS MT (mobile terminated) dalla piattaforma verso la propria SIM card identificata tramite ICCID

Esempio

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{"Tag": "send_sms", "Input": "{\"iccid\":\"YOUR_ICCID\", \"messagetext\":\"YOUR_MESSAGE\"}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Esempio con periodo di validità

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{"Tag": "send_sms", "Input": "{\"iccid\":\"YOUR_ICCID\", \"messagetext\":\"YOUR_MESSAGE\", \"tpvp\":167}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Parametri di input:
– YOUR_API_TOKEN: è il token API ottenuto seguendo gli step esposti nella FAQ “API get user API Token”
– iccid: è l’ICCID della SIM card che riceve SMS
– messagetext: il testo del messaggio (max 160 caratteri)
– tpvp (opzionale): è l’intervallo massimo entro il quale il sistema tenta l’invio dell’SMS alla SIM prescelta. Se al termine dell’intervallo l’SMS non ha raggiunto la SIM, l’SMS verrà scartato. Se questo valore non è specificato, l’intervallo predefinito è 3 giorni. Valori possibili da 0 a 255. Il funzionamento è basato sul formato TP-VP definito dallo standard “GSM 03.40”. Valori di esempio di seguito:

TPVP Value Validity Period Possible Validity Periods
0-143 (TP-VP + 1) x 5 minutes 5, 10, 15 minutes … 11:55, 12:00 hours
144-167 (12 + (TP-VP – 143) / 2) hours 12:30, 13:00, … 23:30, 24:00 hours
168-196 (TP-VP – 166) days 2, 3, 4, … 30 days
197-255 (TP-VP – 192) weeks 5, 6, 7, … 63 weeks

Parametri di output:
– smsMsgId: rappresenta l’ID del messaggio inviato, può essere utilizzato dall’API get_sms_details (API get Dettaglio SMS) per ottenere i dettagli del messaggio
– err: descrizione dell’errore, se presente

Esempio risposta di output

{
"Output":"{\"result\":\"success\",\"smsMsgId\":123}"
}

Complete PHP example

<?php
$api_token = "YOUR_API_TOKEN";
$service_url = 'https://console.sim.resiot.io/api/scene/runwithcallback';
$curl = curl_init($service_url);
$header = array();
$header[] = 'Accept: application/json';
$header[] = 'Grpc-Metadata-Authorization: ' . $api_token;
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
$curl_post_data = array(
"Tag"=> "send_sms",
"Input"=> "{\"iccid\":\"YOUR_ICCID\", \"messagetext\":\"YOUR_MESSAGE\"}"
);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($curl_post_data));
$curl_response = curl_exec($curl);
curl_close($curl);
echo "raw response: <br>" . $curl_response;
$APIOutputObject = json_decode($curl_response, true);
$Output_Value = json_decode($APIOutputObject["Output"], true);
if(array_key_exists("err", $Output_Value)){
echo "Error: " . $Output_Value["err"];
}else{
$result = $Output_Value["result"];
$smsMsgId = $Output_Value["smsMsgId"];
echo "<br><br><b>PARSED VALUES</b>";
echo "<br>Result: " . $result;
echo "<br>SMS Message Id: " . $smsMsgId;
}
?>

SMS API ricerca SMS

Permette di ottenere gli ID (messageID) degli SMS riferiti a una SIM card

Esempio base

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{"Tag": "search_sms", "Input": "{\"iccid\":\"YOUR_ICCID\", \"fromdate\":\"yyyy-MM-ddTHH:mm:ssZ\"}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Esempio completo

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{"Tag": "search_sms", "Input": "{\"iccid\":\"YOUR_ICCID\", \"fromdate\":\"yyyy-MM-ddTHH:mm:ssZ\", \"todate\":\"yyyy-MM-ddTHH:mm:ssZ\", \"msgtype\":\"MT\"}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Parametri di input:
– YOUR_API_TOKEN: è il token API ottenuto seguendo gli step esposti nella FAQ “API get user API Token”
– iccid: è l’ICCID della SIM card
– fromdate: la data da cui iniziare la ricerca, formato yyyy-MM-ddTHH:mm:ssZ (esempio 2016-04-18T17:31:34+00:00)
– todate: la data in cui terminare la ricerca, formato yyyy-MM-ddTHH:mm:ssZ
– msgtype: indica l’origine del messaggio, “MO” (mobile-originated), “MT” (mobile-terminated)

Parametri di output:
– smsMsgIds: è un array contenente la lista degli ID degli SMS trovati
– err: descrizione dell’errore, se presente

Esempio risposta di output

{
"Output":"{\"result\":\"success\",\"smsMsgIds\":[123, 124, 125]}"
}

Complete PHP example

<?php
$api_token = "YOUR_API_TOKEN";
$service_url = 'https://console.sim.resiot.io/api/scene/runwithcallback';
$curl = curl_init($service_url);
$header = array();
$header[] = 'Accept: application/json';
$header[] = 'Grpc-Metadata-Authorization: ' . $api_token;
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
$curl_post_data = array(
"Tag"=> "search_sms",
"Input"=> "{\"iccid\":\"YOUR_ICCID\", \"fromdate\":\"2021-09-20T07:35:22Z\"}"
);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($curl_post_data));
$curl_response = curl_exec($curl);
curl_close($curl);
echo "raw response: <br>" . $curl_response;
$APIOutputObject = json_decode($curl_response, true);
$Output_Value = json_decode($APIOutputObject["Output"], true);
if(array_key_exists("err", $Output_Value)){
echo "Error: " . $Output_Value["err"];
}else{
$result = $Output_Value["result"];
$smsMsgIds = $Output_Value["smsMsgIds"];
echo "<br><br><b>PARSED VALUES</b>";
echo "<br>Result: " . $totalsim;
foreach($smsMsgIds as $smsId){
echo "<br>Message Id: " . $smsId;
}
}
?>

SMS API get Dettaglio SMS

Permette di ottenere tutti i dati di un SMS

Esempio

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{"Tag": "get_sms_details", "Input": "{\"iccid\":\"YOUR_ICCID\", \"smsid\":\"123\"}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Parametri di input:
– YOUR_API_TOKEN: è il token API ottenuto seguendo gli step esposti nella FAQ “API get user API Token”
– iccid: è l’ICCID della SIM card
smsid: è l’ID dell’ SMS (è possibile ottenerlo tramite l’API ricerca SMS)

Parametri di output:
– smsMsgId: l’id dell’SMS
– status: lo stato dell’SMS
– messageText: il testo del messaggio
– senderLogin: il mittente dell’SMS
– iccid: l’ICCID della SIM card mittente
– sentTo: il destinatario del messaggio
– sentFrom: il device del mittente
– msgType: MO (mobile-originated) o MT (mobile-terminated)
– dateSent: la data d’invio del messaggio
– dateReceived: la data in cui il messaggio è stato ricevuto dal server
– dateModified: la data in cui lo stato di invio è cambiato
– err: descrizione dell’errore, se presente

Esempio risposta di output

{
"Output":"{\"smsMsgId\":123,\"status\":\"Pending\",\"messageText\":\"Hello world\",\"senderLogin\":\"DemoUser\",\"iccid\":\"898***********04784\",\"sentTo\":\"8**********5421\",\"sentFrom\":\"Server\",\"msgType\":\"MT\",\"dateSent\":\"2016-07-11 16:05:16.280-0700\",\"dateModified\":\"2016-07-11 16:05:16.522-0700\"}"
}

Complete PHP example

<?php
$api_token = "YOUR_API_TOKEN";
$service_url = 'https://console.sim.resiot.io/api/scene/runwithcallback';
$curl = curl_init($service_url);
$header = array();
$header[] = 'Accept: application/json';
$header[] = 'Grpc-Metadata-Authorization: ' . $api_token;
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
$curl_post_data = array(
"Tag"=> "get_sms_details",
"Input"=> "{\"iccid\":\"YOUR_ICCID\", \"smsid\":\"123\"}"
);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($curl_post_data));
$curl_response = curl_exec($curl);
curl_close($curl);
echo "raw response: <br>" . $curl_response;
$APIOutputObject = json_decode($curl_response, true);
$Output_Value = json_decode($APIOutputObject["Output"], true);
if(array_key_exists("err", $Output_Value)){
echo "Error: " . $Output_Value["err"];
}else{
$smsMsgId = $Output_Value["smsMsgId"];
$status = $Output_Value["status"];
$messageText = $Output_Value["messageText"];
$senderLogin = $Output_Value["senderLogin"];
$iccid = $Output_Value["iccid"];
$sentTo = $Output_Value["sentTo"];
$sentFrom = $Output_Value["sentFrom"];
$msgType = $Output_Value["msgType"];
$dateSent = $Output_Value["dateSent"];
$dateModified = $Output_Value["dateModified"];
echo "<br><br><b>PARSED VALUES</b>";
echo "<br>Message Id: " . $smsMsgId;
echo "<br>Status: " . $status;
echo "<br>Message text: " . $messageText;
echo "<br>Sender Login: " . $senderLogin;
echo "<br>ICCID: " . $iccid;
echo "<br>Sent to: " . $sentTo;
echo "<br>Sent from: " . $sentFrom;
echo "<br>Message type: " . $msgType;
echo "<br>Date sent: " . $dateSent;
echo "<br>Date modified: " . $dateModified;
}
?>

SMS API set Limite di Utilizzo Sim

Permette di impostare il limite di utilizzo espresso in MB di una SIM card. Se imposti questo valore a 0 allora il limite di utilizzo della SIM è disattivato.
Se nel mese in corso questa SIM utilizza più MB di dati rispetto ai MB del limite di utilizzo allora la SIM viene disattivata. Sarà riattivata all’inizio del mese seguente.
Puoi riattivare manualmente la SIM prima del mese seguente, in questo caso il limite sarà ignorato per il resto del mese.

Esempio

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Grpc-Metadata-Authorization: YOUR_API_TOKEN' \
-d '{"Tag": "set_sim_usage_limit", "Input": "{\"iccid\":\"YOUR_ICCID\", \"usagelimit\":25.5}"}' \
'https://console.sim.resiot.io/api/scene/runwithcallback'

Parametri di input:
– YOUR_API_TOKEN: è il token API ottenuto seguendo gli step esposti nella FAQ “API get user API Token”
– iccid: l’ICCID della SIM card
– usagelimit: il limite di utilizzo in MB. Se usagelimit è 0 allora il limite di utilizzo della SIM è disattivato

Parametri di output:
– result: indica se l’azione è stata avviata correttamente o se si è verificato un errore, valori possibili: “success”, “error”
– description: se l’azione è andata in errore contiene la descrizione dell’errore, altrimenti indica il limite di utilizzo impostato

Esempio risposta di output

{
"Output":"{\"result\":\"success\",\"description\":\"Usage Limit set to 25.5MB\"}"
}

Complete PHP example

<?php
$api_token = "YOUR_API_TOKEN";
$service_url = 'https://console.sim.resiot.io/api/scene/runwithcallback';
$curl = curl_init($service_url);
$header = array();
$header[] = 'Accept: application/json';
$header[] = 'Grpc-Metadata-Authorization: ' . $api_token;
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
$curl_post_data = array(
"Tag"=> "set_sim_usage_limit",
"Input"=> "{\"iccid\":\"YOUR_ICCID\", \"usagelimit\":25.5}"
);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($curl_post_data));
$curl_response = curl_exec($curl);
curl_close($curl);
echo "raw response: <br>" . $curl_response;
$APIOutputObject = json_decode($curl_response, true);
$Output_Value = json_decode($APIOutputObject["Output"], true);
if(array_key_exists("err", $Output_Value)){
echo "Error: " . $Output_Value["err"];
}else{
$result = $Output_Value["result"];
$description = $Output_Value["description"];
echo "<br><br><b>PARSED VALUES</b>";
echo "<br>Result: " . $result;
echo "<br>Description: " . $description;
}
?>