Input Content

PingAfrik API Documentation

For more Programming Languages Visit the Button Below

Example Request

curl --location --request POST 'https://mysms.pingafrik.com/api/sms/send' \
--form 'key=********' \
--form 'secret=********' \
--form 'contacts=0244000000' \
--form 'sender_id=pingAfrik' \
--form 'message=From API 1'

Example Response

{
  "errorCode": "000",
  "feedBack": "SMS sent successfully (1 recipient(s))!",
  "data": null
}
Example Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://mysms.pingafrik.com/api/sms/send",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => array('key' => '********','secret' => '********','contacts' => '0244000000','sender_id' => 'pingAfrik','message' => 'From API 1'),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Example Response
{
  "errorCode": "000",
  "feedBack": "SMS sent successfully (1 recipient(s))!",
  "data": null
}
Example Request
var form = new FormData();
form.append("key", "********");
form.append("secret", "********");
form.append("contacts", "0244000000");
form.append("sender_id", "pingAfrik");
form.append("message", "From API 1");

var settings = {
  "url": "https://mysms.pingafrik.com/api/sms/send",
  "method": "POST",
  "timeout": 0,
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
Example Response
{
  "errorCode": "000",
  "feedBack": "SMS sent successfully (1 recipient(s))!",
  "data": null
}
Example Request
var client = new RestClient("https://mysms.pingafrik.com/api/sms/send");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AlwaysMultipartFormData = true;
request.AddParameter("key", "********");
request.AddParameter("secret", "********");
request.AddParameter("contacts", "0244000000");
request.AddParameter("sender_id", "pingAfrik");
request.AddParameter("message", "From API 1");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Example Response
{
  "errorCode": "000",
  "feedBack": "SMS sent successfully (1 recipient(s))!",
  "data": null
}
Need Help? Chat with us