In dieser Dokumentation finden Sie Anleitungen, wie Sie mit Hilfe der HTTP-API schnell SMS-Dienste in verschiedene Lösungen integrieren können.
Unsere API basiert auf dem REST-Standard. Um mit unserer API zu interagieren, kann jeder Client
Die Dokumentation ist intuitiv und mit Blick auf die Entwickler geschrieben.
Um unsere API nutzen zu können, benötigen Sie Identifikationsinformationen.
Diese werden nicht nur für die API, sondern auch für andere Dienste wie z.B. Ihren Kundenbereich verwendet.
Obwohl Sie das HTTP-Protokoll verwenden können, empfehlen wir Ihnen dringend, alle Ihre Anfragen an die SMS-API-API über
URL de base :
https://vavasms.com/api
Wir verwenden Zahlenformatierung E.164 die international standardisiert ist. Telefonnummern werden in der Regel mit einem + (Plus) Zeichen vorangestellt, gefolgt von der Ländervorwahl, der Netzvorwahl und der Teilnehmernummer.
Anzeige | Die Telefonnummer |
---|---|
225 | 09000001 |
Nous n'envoyons des méssages qu'à des numéro de téléphone valide (numéros), écrit en format international par ex. 22509000001, 22377000010
POST : https://vavasms.com/api/v1/check/balance
Name | Typ | Beschreibung |
---|---|---|
username | string | die E-Mail Ihres Kontos |
password | string | das Passwort für Ihr Konto |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://vavasms.com/api/v1/check/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "username=your_email&password=your_password",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/x-www-form-urlencoded"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "username=your_email&password=your_password");
Request request = new Request.Builder()
.url("https://vavasms.com/api/v1/check/balance")
.method("POST", body)
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.build();
Response response = client.newCall(request).execute();
var settings = {
"url": "https://vavasms.com/api/v1/check/balance",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/x-www-form-urlencoded"
},
"data": {
"username": "your_email",
"password": "your_password"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require("request");
var options = { method: 'POST',
url: 'https://vavasms.com/api/v1/check/balance',
headers:
{'cache-control': 'no-cache',
'Host': 'vavasms.com',
'Content-Type': 'application/x-www-form-urlencoded'},
form: { username: 'your_email', password: 'your_password' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
import mimetypes
conn = http.client.HTTPSConnection("vavasms.com")
payload = 'username=your_email&password=your_password'
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
conn.request("POST", "/api/v1/check/balance", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var client = new RestClient("https://vavasms.com/api/v1/check/balance");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("username", "your_email");
request.AddParameter("password", "your_password");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
{
"code": 0,
"message": "OPERATION_SUCCES",
"data": {
"amount": 25540,
"currency": "XOF"
}
}
{
"code": 901,
"message": "INVALID_CREDENTIALS",
"description": "Identifiant de connexion incorrect",
"data": []
}
NB: Der Saldo ist in XOF (XOF)
Standardmäßig ist Ihr Benutzername Ihr
Name | Typ | Beschreibung |
---|---|---|
username | string | die E-Mail Ihres Kontos |
password | string | das Passwort für Ihr Konto |
sender_id | string | Die Länge der alphanumerischen sender_id muss zwischen 3 und 11 Zeichen betragen (Beispiel: <code> CompanyName </ code>). |
phone | string |
Die Nummer(n) des Empfängers der Nachricht. Durch Komma getrennt, wenn Sie an mehrere Telefonnummern senden wollen
Beispiel für das Senden an einen Kontakt : 22509000001 Beispiel für das Senden an mehrere Kontakte: 22509000001,22509000002 |
message | string | Text der Nachricht, die gesendet wird. |
Die maximale Länge einer Nachricht beträgt 160 Zeichen für den GSM7-Standard bzw. 70 Zeichen für Unicode-kodierte Nachrichten. Wenn Sie einen Text senden, der die maximale Anzahl der unterstützten Zeichen überschreitet, wird die gesendete Nachricht segmentiert und entsprechend abgerechnet. Eine lange SMS, die aus zwei SMS-Nachrichten besteht, zählt als zwei SMS-Nachrichten.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://vavasms.com/api/v1/text/single",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "username=your_email&password=your_password&sender_id=your_sender_id&phone=your_receiver_phone_number&message=your_message_here",
CURLOPT_HTTPHEADER => array(
"Accept: */*",
"Content-Type: application/x-www-form-urlencoded",
"Host: vavasms.com"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "username=your_email&password=your_password&sender_id=your_sender_id&phone=your_receiver_phone_number&message=your_message_here");
Request request = new Request.Builder()
.url("https://vavasms.com/api/v1/text/single")
.post(body)
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.addHeader("Accept", "*/*")
.addHeader("Host", "vavasms.com")
.build();
Response response = client.newCall(request).execute();
var settings = {
"async": true,
"crossDomain": true,
"url": "https://vavasms.com/api/v1/text/single",
"method": "POST",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Accept": "*/*",
"Host": "vavasms.com"
},
"data": {
"username": "your_email",
"password": "your_password",
"sender_id": "your_sender_id",
"phone": "your_receiver_phone_number",
"message": "your_message_here"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require("request");
var options = { method: 'POST',
url: 'https://vavasms.com/api/v1/text/single',
headers:
{ 'Host': 'vavasms.com',
'Accept': '*/*',
'Content-Type': 'application/x-www-form-urlencoded' },
form:
{ username: 'your_email',
password: 'your_password',
sender_id: 'your_sender_id',
phone: 'your_receiver_phone_number',
message: 'your_message_here' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPConnection("vavasms.com")
payload = "username=your_email&password=your_password&sender_id=your_sender_id&phone=your_receiver_phone_number&message=your_message_here"
headers = {
'Content-Type': "application/x-www-form-urlencoded",
'Accept': "*/*",
'Host': "vavasms.com"
}
conn.request("POST", "api,v1,text,single", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "OPERATION_SUCCES",
"data": {
"lot_id": "LOT-20190623-1217676",
"description": "Message envoyé avec succès",
"message_id": [
"SM-20190623-1217879"
]
}
}
{
"code": "901",
"status": "INVALID_CREDENTIALS",
"description": "Identifiant de connexion incorrect",
}
{
"code": "902",
"status": "INVALID_SENDER_ID",
"description": "Le sender_id n’existe pas",
}
{
"code": "903",
"status": "INVALID_PHONE_NUMBER",
"description": "Le format du numéro de téléphone est invalide",
}
Name | Typ | Beschreibung |
---|---|---|
username | string | die E-Mail Ihres Kontos |
password | string | das Passwort für Ihr Konto |
message_id | string | Die Mesage-Kennung Ex : RMA029VA222991919 |
lot_id | string | wahlweise | Die Chargenkennung Ex : RMA029VA222991919 |
{
"code": 0,
"message": "OPERATION_SUCCES",
"data": [
{
"lot_id": "LOT-20190617-1445425",
"message_id": "SM-20190617-1445914",
"status": "sent",
"description": "Envoyé"
}
]
}
{
"code": "901",
"status": "INVALID_CREDENTIALS",
"description": "Identifiant de connexion incorrect",
}
{
"code": "709",
"message": "EXECUTION_ERROR",
"description": "Aucun envoi existe pour ce ID",
"data": []
}
Der Benachrichtigungslink ist derjenige, der von der Plattform aufgerufen wird, um Sie über den Empfang einer SMS und deren Inhalt zu informieren.
Diese URL muss für das Hosten von HTTP-Anforderungen vom Typ POST verfügbar sein.
Sie müssen Ihre Benachrichtigungsurl in Ihrem Backoffice konfigurieren
Name | Typ | Beschreibung |
---|---|---|
message_id | string | die Nachrichtenkennung |
form | string | Der Absender der SMS |
content | string | den Inhalt der Nachricht |
sms_date | string | das Datum des Eingangs der SMS |
Hinweis : Bitte beachten Sie den Wert von «message_id», um eine doppelte Verarbeitung zu vermeiden.
Name | Typ | Beschreibung |
---|---|---|
username | string | die E-Mail Ihres Kontos |
password | string | das Passwort für Ihr Konto |
sender_id | string | La longueur du sender_id alphanumérique doit être comprise entre 3 et 11 caractères (exemple : CompanyName ).
|
otp_length | integer | La longueur de l'OTP à generer. doit être comprise entre 4 et 9 par defaut : 4 .
|
otp_expiry | integer |
La durée de l'OTP à verifier en minute. par défaut : 60 |
phone | string | Le numéro de destination du message qui reçoit le code OTP. Exemple d'envoi à un contact : 22509000001 |
message | string | Texte du message qui sera envoyé. le message doit comporter la balise ##OTP## Par defaut, le message est : Votre code OTP est : ##OTP## |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://vavasms.com/api/v1/otp/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "username=your_email&password=your_password&sender_id=your_sender_id&phone=your_receiver_phone_number",
CURLOPT_HTTPHEADER => array(
"Accept: */*",
"Content-Type: application/x-www-form-urlencoded",
"Host: vavasms.com"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "username=your_email&password=your_password&sender_id=your_sender_id&phone=your_receiver_phone_number");
Request request = new Request.Builder()
.url("https://vavasms.com/api/v1/otp/send")
.post(body)
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.addHeader("Accept", "*/*")
.addHeader("Host", "vavasms.com")
.build();
Response response = client.newCall(request).execute();
var settings = {
"async": true,
"crossDomain": true,
"url": "https://vavasms.com/api/v1/otp/send",
"method": "POST",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Accept": "*/*",
"Host": "vavasms.com"
},
"data": {
"username": "your_email",
"password": "your_password",
"sender_id": "your_sender_id",
"phone": "your_receiver_phone_number"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require("request");
var options = { method: 'POST',
url: 'https://vavasms.com/api/v1/otp/send',
headers:
{ 'Host': 'vavasms.com',
'Accept': '*/*',
'Content-Type': 'application/x-www-form-urlencoded' },
form:
{ username: 'your_email',
password: 'your_password',
sender_id: 'your_sender_id',
phone: 'your_receiver_phone_number' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
var request = require("request");
var options = { method: 'POST',
url: 'https://vavasms.com/api/v1/otp/send',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
form:
{ username: 'your_email',
password: 'your_password',
sender_id: 'your_sender_id',
phone: 'your_receiver_phone_number' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"code": 0,
"message": "OPERATION_SUCCES",
"data": {
"message_id": "OTP-20190621-2234509",
"description": "OTP envoyé avec succès"
}
}
{
"code": "901",
"status": "INVALID_CREDENTIALS",
"description": "Identifiant de connexion incorrect",
}
{
"code": "902",
"status": "INVALID_SENDER_ID",
"description": "Le sender_id n’existe pas",
}
{
"code": "903",
"status": "INVALID_PHONE_NUMBER",
"description": "Le format du numéro de téléphone est invalide",
}
Name | Typ | Beschreibung |
---|---|---|
username | string | die E-Mail Ihres Kontos |
password | string | das Passwort für Ihr Konto |
otp | integer | Le code OTP à verifier. |
phone | string | Le numéro de téléphone qui a reçu le code OTP. Exemple d'envoi à un contact : 22509000001 |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://vavasms.com/api/v1/otp/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "username=your_email&password=your_password&sender_id=your_sender_id&phone=your_receiver_phone_number&otp=otp_received",
CURLOPT_HTTPHEADER => array(
"Accept: */*",
"Content-Type: application/x-www-form-urlencoded",
"Host: vavasms.com"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "username=your_email&password=your_password&sender_id=your_sender_id&phone=your_receiver_phone_number&otp=otp_received");
Request request = new Request.Builder()
.url("https://vavasms.com/api/v1/otp/verify")
.post(body)
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.addHeader("Accept", "*/*")
.addHeader("Host", "vavasms.com")
.build();
Response response = client.newCall(request).execute();
var settings = {
"async": true,
"crossDomain": true,
"url": "https://vavasms.com/api/v1/otp/verify",
"method": "POST",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Accept": "*/*",
"Host": "vavasms.com"
},
"data": {
"username": "your_email",
"password": "your_password",
"sender_id": "your_sender_id",
"phone": "your_receiver_phone_number",
"otp": "otp_received",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require("request");
var options = { method: 'POST',
url: 'https://vavasms.com/api/v1/otp/verify',
headers:
{ 'Host': 'vavasms.com',
'Accept': '*/*',
'Content-Type': 'application/x-www-form-urlencoded' },
form:
{ username: 'your_email',
password: 'your_password',
sender_id: 'your_sender_id',
otp: 'otp_received',
phone: 'your_receiver_phone_number' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
var request = require("request");
var options = { method: 'POST',
url: 'https://vavasms.com/api/v1/otp/verify',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
form:
{ username: 'your_email',
password: 'your_password',
sender_id: 'your_sender_id',
otp: 'otp_received',
phone: 'your_receiver_phone_number' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"code": 0,
"message": "OPERATION_SUCCES",
"data": {
"message_id": "OTP-20190621-2250698",
"status": "success"
}
}
{
"code": "901",
"status": "INVALID_CREDENTIALS",
"description": "Identifiant de connexion incorrect",
}
{
"code": "902",
"status": "INVALID_SENDER_ID",
"description": "Le sender_id n’existe pas",
}
{
"code": 913,
"message": "INVALID_OTP",
"description": "vavasms.INVALID_OTP",
"data": []
}