Endpoint Join

(Api: JoinApi_v_001)


Endpoint SendSms

(Api: SendSmsApi_v_001)

PostInsNewSms.


Link: “https://joinapiweb.jointechnology.it/api/SendSmsApi_v_001/”

Method: “PostInsNewSms”


 Create a "csv" file for the messages to be sent, separating the columns with ";" and the following content


 "039;0000000000;3470000000;testo Sms;1"


039 represents the recipient's international prefix.
0000000000 campo vuoto
3470000000 the recipient's telephone number
testoSms 160 character text
1 your ID

Create the Json for sending: "{\"dati\":[{\"DATI\":\"" + messaggi + "\"" + "}]}";

messages contains the SMS to be sent.

Parameters to pass as Header:


(Example in C#)


public async Task PostInviaSmsAsync(string messaggi, string token)
{
string fileJson = "{\"dati\":[{\"DATI\":\"" + messaggi + "\"" + "}]}";
var requestContent = new StringContent(fileJson, Encoding.UTF8, "application/json");
var newApi = "https://joinapiweb.jointechnology.it/api/SendSmsApi_v_001/PostInsNewSms";
using HttpClient client = new();
client.BaseAddress = new Uri(newApi);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
HttpResponseMessage response = await client.PostAsync(newApi, requestContent);
string data11 = await response.Content.ReadAsStringAsync();
string data = await response.Content.ReadAsStringAsync();
return result;
}


Json returned from the call:


{

 "dati":[

     {

    "ErrCode":"0",

    "ErrDesc":"OK"

     }

           ]

 }

 ErrDesc is evaluated with "OK" for success, with the description of the error with failure