Plateforme de
messageries mobiles A2P

Intégrez les SMS, TTS, WhatsApp & RCS
à vos applications & votre communication

Spécialiste de l’envoi et la réception de SMS, TTS, WhatsApp et RCS, nos solutions de messageries mobiles performantes s’adaptent à tous vos besoins et tous vos volumes. Avec une couverture mondiale en connexion directe opérateurs, les solutions de notre plateforme CPaaS vous permettront de construire des applications via nos APIs et webservices puissants.

PLATEFORME DE MOBILE MESSAGING
DES SERVICES SIMPLES & PUISSANTS
ADAPTÉS À CHACUN DE VOS BESOINS

Développez votre business avec des outils performants et constamment améliorés par notre équipe. Ils sont conçus pour être intuitifs, faciles à utiliser pour réaliser vos campagnes vers des milliers de contacts en quelques clics seulement !

 

  • plateforme SaaS en libre-service
  • fonctionnalités complètes pour l’envoi, la gestion, l’analyse ou les exports des campagnes
  • statistiques de réception fournies et gestion automatique des désabonnements

CRÉEZ VOTRE COMPTE GRATUIT

plateforme d'envoi de SMS

INTEGRATION
IMPLÉMENTEZ RAPIDEMENT NOTRE API SMS
À L’AIDE DE NOS SDK

Intégrez toutes les fonctionnalités d’envoi, de réception et d’authentification par SMS en haute qualité dans votre
application, votre site ou logiciel, en quelques minutes. En utilIsant notre API Rest, vous réalisez des notifications par SMS rapidement, de manière fiable, sécurisée et partout dans le monde.

 

  • compatible avec tous les langages de programmation (PHP, Java, ASP, C++, Ruby, WINDEV, etc.)
  • full SDK et librairies disponibles avec des snippets des requêtes disponibles
  • forte expérience dans l’accompagnement de startups
$url = 'https://api.smsmode.com/http/1.6';
$pathSendSms = "/sendSMS.do";
$pathSendSmsBatch = "/sendSMSBatch.do";
$accessToken = 'xxxxYYYYYYAAAAAZZZZZZ'; //modify (Required)
$message = 'My Message €€ éé ££££ ùùùù';
$destinataires = '06XXXXXXXXX,07YYYYYYYY'; //Receivers separated by a comma
$emetteur = 'MySenderId'; //Optional parameter, allows to deal with the sms sender
$optionStop = '1'; //Deal with the STOP sms when marketing send (cf. API HTTP documentation)
$batchFilePath = "pathCSVFile"; //modify to define the path of CSV file for sms in Batch Mode

send_sms_get($url, $pathSendSms, $accessToken, $message, $destinataires, $emetteur, $optionStop);
send_sms_post($url, $pathSendSms, $accessToken, $message, $destinataires, $emetteur, $optionStop);
send_sms_batch($url, $pathSendSmsBatch, $accessToken, $batchFilePath, $optionStop);

// send SMS with GET method
function send_sms_get($url, $path, $accessToken, $message, $destinataires, $emetteur, $optionStop) {
 
 $message = iconv("UTF-8", "ISO-8859-15", $message);
 $fields_string = '?accessToken='.$accessToken.'&message='.urlencode($message).'&numero='.$destinataires.'&emetteur='.$emetteur.'&stop='.$optionStop;
 
 $ch = curl_init();
 curl_setopt($ch,CURLOPT_URL, $url.$path.$fields_string);
 $result = curl_exec($ch);
 
 curl_close($ch);
 return $result;
}

// send SMS with POST method
function send_sms_post($url, $path, $accessToken, $message, $destinataires, $emetteur, $optionStop) {
 
 $message = iconv("UTF-8", "ISO-8859-15", $message);
 $fields_string = 'accessToken='.$accessToken.'&message='.urlencode($message).'&numero='.$destinataires.'&emetteur='.$emetteur.'&stop='.$optionStop;
 
 $ch = curl_init();
 curl_setopt($ch,CURLOPT_URL, $url.$path);
 curl_setopt($ch,CURLOPT_POST, 1);
 curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
 
 $result = curl_exec($ch);
 
 curl_close($ch);
 return $result;
}

// send SMS with POST method (Batch)
function send_sms_batch($url, $path, $accessToken, $batchFilePath, $optionStop) {

 $fields_string = '?accessToken='.$accessToken.'&stop='.$optionStop;
 $cfile = new CurlFile($batchFilePath, 'text/csv');
 $data = array('data-binary' => $cfile);

 $ch = curl_init();
 curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'content-type: multipart/form-data' ));
 curl_setopt($ch,CURLOPT_URL, $url.$path.$fields_string);
 curl_setopt($ch,CURLOPT_POST, 1);
 curl_setopt($ch,CURLOPT_POSTFIELDS, $data);
 
 $result = curl_exec($ch);
 
 curl_close($ch);
 return $result;
}
const urlencode = require('urlencode');
const http = require('https');
const querystring = require('querystring');
const fs = require('fs');
var pathname = require("path");

hostname = 'api.smsmode.com'
pathSendSms = "/sendSMS.do";
pathSendSmsBatch = "/sendSMSBatch.do";
accessToken = 'xxxxYYYYYYAAAAAZZZZZZ'; //modify (Required)
message = 'My Message €€ éé ££££ ùùùù';
destinataires = '06XXXXXXXXX,07YYYYYYYY'; //Receivers separated by a comma
emetteur = 'MySenderId'; //Optional parameter, allows to deal with the sms sender
optionStop = '1'; //Deal with the STOP sms when marketing send (cf. API HTTP documentation)
batchFilePath = "pathCSVFile"; //modify to define the path of CSV file for sms in Batch Mode

send_sms_get(hostname, pathSendSms, accessToken, message, destinataires, emetteur, optionStop);
send_sms_post(hostname, pathSendSms, accessToken, message, destinataires, emetteur, optionStop);
send_sms_batch(hostname, pathSendSmsBatch, accessToken, batchFilePath, optionStop);

// send SMS with GET method
function send_sms_get(hostname, path, accessToken, message, destinataires, emetteur, optionStop) {
 
 var finalPath = '/http/1.6' + path + '?accessToken=' + accessToken + '&numero=' + destinataires + 
     "&message=" + urlencode(message,'ISO-8859-15') + '&emetteur=' + emetteur + '&stop=' + optionStop;
 
 const options = {
     hostname: hostname,
     port: 443,
     path: finalPath,
     method: 'GET'
 };
 const req = send_request(options);
 req.end();
}

// send SMS with POST method
function send_sms_post(hostname, path, accessToken, message, destinataires, emetteur, optionStop) {
 
 var finalPath = '/http/1.6' + path
 var postData = querystring.stringify({
     'accessToken': accessToken, 
     'numero': destinataires, 
     'emetteur' : emetteur,
     'stop' : optionStop
 });
 postData = postData + "&message=" + urlencode(message,'ISO-8859-15');
 const options = {
     hostname: hostname,
     port: 443,
     path: finalPath,
     method: 'POST',
     headers: {
         'Content-Type': 'application/x-www-form-urlencoded; charset=ISO-8859-15',
         'Content-Length': Buffer.byteLength(postData)
     }
 };
 const req = send_request(options);
 req.write(postData);
 req.end();
}

// send SMS with POST method (Batch)
function send_sms_batch(hostname, path, accessToken, batchFilePath, optionStop) {

 var finalPath = '/http/1.6' + path + "?accessToken=" + accessToken + "&stop=" + optionStop;
 fs.readFile(batchFilePath, function(err, content) {
     if (err){
         console.error(err);
     }
     var boundary = "AaB03x";
     var postData = Buffer.concat([
         Buffer.from("--" + boundary + "\r\n"),
         Buffer.from("Content-Disposition: form-data; name=\"file\"; filename=\""),
         Buffer.from(pathname.basename(batchFilePath) + "\"\r\n"),
         Buffer.from("Content-Type:text/csv\r\n\r\n"),
         Buffer.from(content),
         Buffer.from("\r\n--" + boundary + "--\r\n"),
     ]);
     var options = {
         method: 'POST',
         hostname: hostname,
         port: 443,
         path: finalPath,
         headers: {
             "Content-Type": "multipart/form-data; boundary=" + boundary,
             "Content-Length": Buffer.byteLength(postData)
         }
     };
     const req = send_request(options);
     req.write(postData);
     req.end();
 });
}

function send_request(options) {
 const req = http.request(options, (res) => {
     console.log(`STATUS: ${res.statusCode}`);
     res.on('data', (chunk) => {
         console.log(`BODY: ${chunk}`);
     });
     res.on('end', () => {
         console.log("No more data in response.");
     });
 });
 req.on('error', (e) => {
     console.error("problem with request: ${e.message}");
 });
 return req;
}
package com.calade.tools.temp;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
import org.apache.commons.httpclient.methods.multipart.Part;
import org.apache.commons.httpclient.util.EncodingUtil;
import java.io.File;
import java.io.InputStream;
import java.util.Scanner;

public class ExempleClientHttpAPI {

 public ExempleClientHttpAPI() {
     super();
 }

 public static void main(String[] args) {

     String url = "https://api.smsmode.com/http/1.6/";
     String pathSendSms = "/sendSMS.do";
     String pathSendSmsBatch = "/sendSMSBatch.do";
     String accessToken = "xxxxYYYYYYAAAAAZZZZZZ"; //modify (Required)
     String message = "My Message €€ éé ££££ ùùùù";
     String destinataires = "06XXXXXXXXX,07YYYYYYYY"; //Receivers separated by a comma
     String emetteur = "MySenderId"; //Optional parameter, allows to deal with the sms sender
     String optionStop = "1"; //Deal with the STOP sms when marketing send (cf. API HTTP documentation)
     String batchFilePath = "pathCSVFile"; //modify to define the path of CSV file for sms i Batch Mode

     ExempleClientHttpAPI client = new ExempleClientHttpAPI();

     client.send_sms_get(url, pathSendSms, accessToken, message, destinataires, emetteur, optionStop);
     client.send_sms_post(url, pathSendSms, accessToken, message, destinataires, emetteur, optionStop);
     client.send_sms_batch(url, pathSendSmsBatch, accessToken, batchFilePath, optionStop);
 }

 // send SMS with GET method
 public void send_sms_get(String url, String path, String accessToken, String message, String destinataires, String emetteur, String optionStop) {
     try {
         HttpClient httpClient = new HttpClient();
         String finalUrl = url + path;
         GetMethod httpMethod = new GetMethod(finalUrl);
         httpMethod.addRequestHeader("Content-Type", "plain/text; charset=ISO-8859-15");

         NameValuePair params[] = {
             new NameValuePair("accessToken", accessToken),
             new NameValuePair("message", message),
             new NameValuePair("numero", destinataires),
             new NameValuePair("emetteur", emetteur),
             new NameValuePair("stop", optionStop)
         };

         httpMethod.setQueryString(EncodingUtil.formUrlEncode(params, "ISO-8859-15"));
         int codeReponse = httpClient.executeMethod(httpMethod);
         if (codeReponse == HttpStatus.SC_OK || codeReponse == HttpStatus.SC_ACCEPTED) {
             System.out.println(convertToString(httpMethod.getResponseBodyAsStream()));
         }
     } catch (Exception e) {
         e.printStackTrace();
         System.err.println("Error during API call");
     }
 }

 // send SMS with POST method
 public void send_sms_post(String url, String path, String accessToken, String message, String destinataires, String emetteur, String optionStop) {
     try {
         HttpClient httpClient = new HttpClient();
         String finalUrl = url + path;
         PostMethod httpMethod = new PostMethod(finalUrl);
         httpMethod.addRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=ISO-8859-15");
 
         NameValuePair data[] = {
             new NameValuePair("accessToken", accessToken),
             new NameValuePair("message", message),
             new NameValuePair("numero", destinataires),
             new NameValuePair("emetteur", emetteur),
             new NameValuePair("stop", optionStop)
         };

         httpMethod.setRequestBody(data);
         int codeReponse = httpClient.executeMethod(httpMethod);
         if (codeReponse == HttpStatus.SC_OK || codeReponse == HttpStatus.SC_ACCEPTED) {
             System.out.println(convertToString(httpMethod.getResponseBodyAsStream()));
         }
     } catch (Exception e) {
         e.printStackTrace();
         System.err.println("Error during API call");
     }
 }

 // send SMS with POST method (Batch)
 public void send_sms_batch(String url, String path, String accessToken, String batchFilePath, String optionStop) {
     try {
         HttpClient httpClient = new HttpClient();
         String finalUrl = url + path + "?accessToken=" + accessToken + "&stop=" + optionStop;
         PostMethod httpMethod = new PostMethod(finalUrl);

         File file = new File(batchFilePath);
         Part[] parts = new Part[1];
         parts[0] = new FilePart(file.getName(), file, "text/csv", null);

         httpMethod.setRequestEntity(new MultipartRequestEntity(parts, httpMethod.getParams()));
         int codeReponse = httpClient.executeMethod(httpMethod);
         if (codeReponse == HttpStatus.SC_OK || codeReponse == HttpStatus.SC_ACCEPTED) {
             System.out.println(convertToString(httpMethod.getResponseBodyAsStream()));
         }
     } catch (Exception e) {
         e.printStackTrace();
         System.err.println("Error during API call");
     }
 }

 private String convertToString(InputStream stream) {
     Scanner sc = new Scanner(stream);
     StringBuffer sb = new StringBuffer();
     while(sc.hasNext()){
         sb.append(sc.nextLine());
     }
     return sb.toString();
 }
}
#!/usr/bin/python
# coding=utf-8
import requests
import urllib
import sys

# send SMS with GET method
def send_sms_get(url, path, accessToken, message, destinataires, emetteur, optionStop):

 finalUrl = (url + path + 
     '?accessToken=' + accessToken + 
     '&message=' + urllib.quote_plus(message.encode('iso-8859-15')) + 
     '&numero=' + destinataires + 
     '&emetteur=' + emetteur + 
     '&stop=' + optionStop)
 r = requests.get(finalUrl)

 print r.text

# send SMS with POST method
def send_sms_post(url, path, accessToken, message, destinataires, emetteur, optionStop):

 finalUrl = url + path
 headers = {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
 payload = {
     'accessToken': accessToken,
     'message': message,
     'numero': destinataires,
     'emetteur': emetteur,
     'stop': optionStop
 }

 r = requests.post(finalUrl, data=payload, headers=headers)
 
 print r.text

# send SMS with POST method (Batch)
def send_sms_batch(url, path, accessToken, batchFilePath, optionStop):

 finalUrl = url + path + "?accessToken=" + accessToken + "&stop=" + optionStop

 r = requests.post(finalUrl, files={'file': open(batchFilePath,'rb')})
 
 print r.text


url = 'https://api.smsmode.com/http/1.6'
pathSendSms = "/sendSMS.do"
pathSendSmsBatch = "/sendSMSBatch.do"
accessToken = 'xxxxYYYYYYAAAAAZZZZZZ' # modify (Required)
message = u'My Message €€ éé ££££ ùùùù'
destinataires = '06XXXXXXXXX,07YYYYYYYY' # Receivers separated by a comma
emetteur = 'MySenderId' # Optional parameter, allows to deal with the sms sender
optionStop = '1' # Deal with the STOP sms when marketing send (cf. API HTTP documentation)
batchFilePath = "pathCSVFile"; #modify to define the path of CSV file for sms in Batch Mode

send_sms_get(url, pathSendSms, accessToken, message, destinataires, emetteur, optionStop)
send_sms_post(url, pathSendSms, accessToken, message, destinataires, emetteur, optionStop)
send_sms_batch(url, pathSendSmsBatch, accessToken, batchFilePath, optionStop)

using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using System.Threading;
using System.Text;
using System.Web;

public class SendSMSExemple {

 private static readonly HttpClient _httpClient= new HttpClient();
 
 public static void Main(string[] args) {
 
     string url = "https://api.smsmode.com/http/1.6";
     string pathSendSms = "/sendSMS.do";
     string pathSendSmsBatch = "/sendSMSBatch.do";
     string accessToken = "xxxxYYYYYYAAAAAZZZZZZ"; //modify (Required)
     string message = "My Message €€ éé ££££ ùùùù";
     string destinataires = "06XXXXXXXXX,07YYYYYYYY"; //Receivers separated by a comma
     string emetteur = "MySenderId"; //Optional parameter, allows to deal with the sms sender
     string optionStop = "1"; //Deal with the STOP sms when marketing send (cf. API HTTP documentation)
     string batchFilePath = "pathCSVFile"; //modify to define the path of CSV file for sms in Batch Mode
 
     SendSMSExemple client = new SendSMSExemple();

     client.send_sms_get(url, pathSendSms, accessToken, message, destinataires, emetteur, optionStop);
     client.send_sms_post(url, pathSendSms, accessToken, message, destinataires, emetteur, optionStop);
     client.send_sms_batch(url, pathSendSmsBatch, accessToken, batchFilePath, optionStop);
 }
 
 // send SMS with GET method 
 public void send_sms_get(string url, string path, string accessToken, string message, string destinataires, string emetteur, string optionStop) { 

     string urlEncodedMessage = HttpUtility.UrlEncode(message, Encoding.GetEncoding("ISO-8859-15"));
     string finalUrl = url + path + "?accessToken=" + accessToken + "&numero=" + destinataires + "&message=" + urlEncodedMessage + "&emetteur=" + emetteur + "&stop=" + optionStop;
 
     string result = Get(finalUrl).Result;
     Console.WriteLine(result);
 }

 public static async Task<string> Get(string url){
 
     using (var response = await _httpClient.GetAsync(url)){
         string result = await response.Content.ReadAsStringAsync();
         return result;
     }
 }

 // send SMS with POST method 
 public void send_sms_post(string url, string path, string accessToken, string message, string destinataires, string emetteur, string optionStop) {
 
     string finalUrl = url + path;

     StringBuilder sb = new StringBuilder();
     sb.Append("accessToken=");
     sb.Append(accessToken);
     sb.Append("&numero=");
     sb.Append(destinataires);
     sb.Append("&emetteur=");
     sb.Append(emetteur);
     sb.Append("&message=");
     sb.Append(HttpUtility.UrlEncode(message, Encoding.GetEncoding("ISO-8859-15")));
     sb.Append("&stop=");
     sb.Append(optionStop);

     string result = Post(finalUrl ,Encoding.Default.GetBytes(sb.ToString())).Result;

     Console.WriteLine(result); 
 }
 
 public static async Task<string> Post(string url, byte[] data){
 
     ByteArrayContent byteContent = new ByteArrayContent(data);
     byteContent.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");
     using (var response = await _httpClient.PostAsync(url,byteContent)){ 
         string result = await response.Content.ReadAsStringAsync();
         return result;
     }
 }

 // send SMS with POST method (batch)
 public void send_sms_batch(string url, string path, string accessToken, string batchFilePath, string optionStop) {
 
     string finalUrl = url + path + "?accessToken=" + accessToken + "&stop=" + optionStop;
     string result = PostBatch(finalUrl , File.ReadAllBytes(batchFilePath), batchFilePath).Result;

     Console.WriteLine(result);
 }

 public static async Task<string> PostBatch(string url, byte[] data, string batchFilePath) {
 
     var requestContent = new MultipartFormDataContent();
     ByteArrayContent byteContent = new ByteArrayContent(data);
     byteContent.Headers.ContentType = MediaTypeHeaderValue.Parse("text/csv");
     requestContent.Add(byteContent, "file", batchFilePath);

     using (var response = await _httpClient.PostAsync(url,requestContent)){ 
         string result = await response.Content.ReadAsStringAsync();
         return result;
     }
 }
}
ResLancement = HTTPRequête("https://api.smsmode.com")
SI ResLancement = Vrai ALORS
 ResCode = HTTPDonneRésultat()
 Info("Code HTML : " + ResCode)
FIN
require 'net/http'
require 'uri'
require 'json'

# send SMS with GET method
def send_sms_get(url, path, accessToken, message, destinataires, emetteur, optionStop)

 header = {'Content-Type': 'plain/text; charset=ISO-8859-15'}
 params = { :accessToken => accessToken, :message => message.encode(Encoding::ISO_8859_15), :numero => destinataires, :emetteur => emetteur, :stop => optionStop}
 
 uri = URI.parse(url + path);
 uri.query = URI.encode_www_form(params)
 
 http = Net::HTTP.new(uri.host,uri.port)
 http.use_ssl = true
 request = Net::HTTP::Get.new(uri.request_uri,header)
 
 res = http.request(request)
 puts res.code
 puts res.body
end
 
# send SMS with POST method
def send_sms_post(url, path, accessToken, message, destinataires, emetteur, optionStop)

 header = {'Content-Type': 'application/x-www-form-urlencoded; charset=ISO-8859-15'}
 params = { :accessToken => accessToken, :message => message.encode(Encoding::ISO_8859_15), :numero => destinataires, :emetteur => emetteur, :stop => optionStop}
 uri = URI.parse(url + path);
 
 http = Net::HTTP.new(uri.host,uri.port)
 http.use_ssl = true
 request = Net::HTTP::Post.new(uri.request_uri,header)
 request.body = URI.encode_www_form(params)
 
 res = http.request(request)
 puts res.code
 puts res.body
end

# send SMS with POST method (Batch)
def send_sms_batch(url, path, accessToken, batchFilePath, optionStop)

 boundary = "AaB03x"

 header = {'Content-Type': "multipart/form-data, boundary=#{boundary}"}
 uri = URI.parse(url + path + '?accessToken=' + accessToken + "&stop=" + optionStop);
 
 post_body = []
 post_body << "--#{boundary}\r\n"
 post_body << "Content-Disposition: form-data; name=\"datafile\"; filename=\"#{File.basename(batchFilePath)}\"\r\n"
 post_body << "\r\n"
 post_body << File.read(batchFilePath)
 post_body << "\r\n--#{boundary}--\r\n"

 http = Net::HTTP.new(uri.host,uri.port)
 http.use_ssl = true
 request = Net::HTTP::Post.new(uri.request_uri, header)
 request.body = post_body.join

 res = http.request(request)
 puts res.code
 puts res.body
end

url = "https://api.smsmode.com/http/1.6"
pathSendSms = "/sendSMS.do"
pathSendSmsBatch = "/sendSMSBatch.do"
accessToken = "xxxxYYYYYYAAAAAZZZZZZ" # modify (Required)
message = "My Message €€ éé ££££ ùùùù"
destinataires = "06XXXXXXXXX,07YYYYYYYY" #Receivers separated by a comma
emetteur = "MySenderId" #Optional parameter, allows to deal with sms sender
optionStop = "1" #Allow to deal with STOP sms when marketing send (cf. API HTTP documentation)
batchFilePath = "pathCSVFile" #modify to define the path of CSV file for sms in Batch Mode

send_sms_get(url, pathSendSms, accessToken, message, destinataires, emetteur, optionStop)
send_sms_post(url, pathSendSms, accessToken, message, destinataires, emetteur, optionStop)
send_sms_batch(url, pathSendSmsBatch, accessToken, batchFilePath, optionStop)
import scalaj.http._
import java.nio.file.{Files, Paths}

object SendSMSExample extends App {

 var url : String = "https://api.smsmode.com/http/1.6";
 var pathSendSms : String = "/sendSMS.do"
 var pathSendSmsBatch : String = "/sendSMSBatch.do"
 var accessToken : String = "xxxxYYYYYYAAAAAZZZZZZ"; //modify (Required)
 var message : String = "My Message €€ éé ££££ ùùùù";
 var destinataires : String = "06XXXXXXXXX,07YYYYYYYY"; //Receivers separated by a comma
 var emetteur : String = "MySenderId"; //Optional parameter, allows to deal with the sms sender
 var optionStop : String = "1"; //Deal with the STOP sms when marketing send (cf. API HTTP documentation)
 var batchFilePath : String = "pathCSVFile"; //modify to define the path of CSV file for sms in Batch Mode

 send_sms_get(url, pathSendSms, accessToken, message, destinataires, emetteur, optionStop);
 send_sms_post(url, pathSendSms, accessToken, message, destinataires, emetteur, optionStop);
 send_sms_batch(url, pathSendSmsBatch, accessToken, batchFilePath, optionStop);

 // send SMS with GET method
 def send_sms_get(url:String, path:String, accessToken:String, message:String, destinataires:String, emetteur:String, optionStop:String) {
     var SendSMSUsingGET = Http(url + path)
     .param("accessToken", accessToken)
     .param("message", message)
     .param("numero", destinataires)
     .param("emetteur", emetteur)
     .param("stop", optionStop)
     .charset("ISO-8859-15")
     .asString.body
 
     println(SendSMSUsingGET)
 }
 
 // send SMS with POST method
 def send_sms_post(url:String, path:String, accessToken:String, message:String, destinataires:String, emetteur:String, optionStop:String) {
     var SendSMSUsingPOST = Http(url + path)
     .postForm(
         Seq(
             "accessToken" -> accessToken,
             "message" -> message,
             "numero" -> destinataires,
             "emetteur" -> emetteur,
             "stop" -> optionStop
         )
     )
     .charset("ISO-8859-15")
     .asString.body
 
     println(SendSMSUsingPOST)
 }
 
 // send SMS with POST method (Batch)
 def send_sms_batch(url:String, path:String, accessToken:String, batchFilePath:String, optionStop:String) {
     var finalUrl : String = url + path + "?accessToken=" + accessToken + "&stop=" + optionStop;
     var SendSMSUsingPOSTBatch = Http(finalUrl)
     .postMulti(MultiPart("file", Paths.get(batchFilePath).getFileName().toString(), "text/csv", Files.readAllBytes(Paths.get(batchFilePath))))
     .asString.body

     println(SendSMSUsingPOSTBatch)
 }
}
#include <iostream>
#include <curl/curl.h>
#include <string.h>
#include <sys/stat.h>

// IMPORTANT ! Compile with -lcurl -fexec-charset=iso-8859-15

// send SMS with GET method
void send_sms_get(std::string url, std::string path, std::string accessToken, std::string message, 
               std::string destinataires, std::string emetteur, std::string optionStop) {

 std::string finalUrl = url + path + 
     "?accessToken=" + accessToken +
     "&message=" + curl_escape(message.c_str(), message.length()) +
     "&numero=" + destinataires +
     "&emetteur=" + emetteur +
     "&stop=" + optionStop;

 CURL *curl;
 CURLcode res;
 curl = curl_easy_init();
 if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, finalUrl.c_str());
     res = curl_easy_perform(curl);
     if(res != CURLE_OK)
         fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
     curl_easy_cleanup(curl);
 }
}

// send SMS with POST method
void send_sms_post(std::string url, std::string path, std::string accessToken, std::string message, 
                std::string destinataires, std::string emetteur, std::string optionStop) {

 std::string finalUrl = url + path;
 std::string postField = "accessToken=" + accessToken + "&message=" + message +
     "&numero=" + destinataires + "&emetteur=" + emetteur + "&stop=" + optionStop;

 CURL *curl;
 CURLcode res;
 curl = curl_easy_init();
 if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, finalUrl.c_str());
     curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postField.c_str());
     res = curl_easy_perform(curl);
     if(res != CURLE_OK)
         fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
     curl_easy_cleanup(curl);
 }
}

// send SMS with POST method (Batch)
void send_sms_batch(std::string url, std::string path, std::string accessToken, std::string batchFilePath, std::string optionStop) {
 
 std::string finalUrl = url + path + "?accessToken=" + accessToken + "&stop=" + optionStop;

 CURL *curl;
 CURLcode res;
 curl = curl_easy_init();
 if(curl) {
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
     curl_easy_setopt(curl, CURLOPT_URL, finalUrl.c_str());
     curl_mime *mime;
     curl_mimepart *part;
     mime = curl_mime_init(curl);
     part = curl_mime_addpart(mime);
     curl_mime_name(part, "File");
     curl_mime_filedata(part, batchFilePath.c_str());
     curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
     res = curl_easy_perform(curl);
     curl_mime_free(mime);
 }
 curl_easy_cleanup(curl);
}

int main(int ac, char **av){

 std::string url = "https://api.smsmode.com/http/1.6";
 std::string pathSendSms = "/sendSMS.do";
 std::string pathSendSmsBatch = "/sendSMSBatch.do";
 std::string accessToken = "xxxxYYYYYYAAAAAZZZZZZ"; //modify (Required)
 std::string message = "My Message €€ éé ££££ ùùùù";
 std::string destinataires = "06XXXXXXXXX,07YYYYYYYY"; //Receivers separated by a comma
 std::string emetteur = "MySenderId"; //Optional parameter, allows to deal with the sms sender
 std::string optionStop = "1"; //Deal with the STOP sms when marketing send (cf. API HTTP documentation)
 std::string batchFilePath = "pathCSVFile"; //modify to define the path of CSV file for sms in Batch Mode

 send_sms_get(url, pathSendSms, accessToken, message, destinataires, emetteur, optionStop);
 send_sms_post(url, pathSendSms, accessToken, message, destinataires, emetteur, optionStop);
 send_sms_batch(url, pathSendSmsBatch, accessToken, batchFilePath, optionStop);

 return 0;
}

AVANTAGES & GARANTIES DE SERVICE
TESTEZ LA DIFFÉRENCE SMSMODE© !

4millions de requêtes
API traitées par jour

envoi de SMS connexion direct opérateursUn routage en direct opérateurs
en notre qualité d’Opérateur Télécom ARCEP

10000clients accompagnés
depuis 2004

Confidentialité des donnéesUne confidentialité
de vos envois

garantie par un chiffrement
de vos données

Proximité de nos services d'envoi de SMSUn service de proximité
avec des interlocuteurs et
des solutions techniques
exclusivement basés à Marseille

support 24/7Un support 24/7
incluant un système
de gestion de tickets
réactif

Membre de la French TechPlateforme CPaaS
française

membre de la French Tech, de la MMAF et de la GSMA

Besoin de plus d’infos ?
N’hésitez pas à nous contacter.