Kirim dengan HTTP(s) API

Untuk mengirimkan pesan WhatsApp Masking anda dapat melakukan nya dengan dua cara yaitu melalui dashboard anda dan melalui http(s) api.

API End Point

https://dnymobile.com/api/v3/wa/send

Parameters
Parameter Required Description
Authorization YES When calling our API, send your api token with the authentication type set as Bearer (Example: Authorization: Bearer {api_token} )
Accept YES Set to application/json
Send WhatsApp

Kirimkan pesan WhatsApp kamu sesuai dengan ketentuan berikut.

Parameters
Parameter Required Type Description
recipient YES string Number to send message
message YES string The body of the message
Example Request

curl -X POST https://dnymobile.com/api/v3/wa/send \ -H 'Authorization: Bearer 7|xs6pv2dspHJq8xdfrpNFH5YLilMRQcVxLwSw2Sd' \ -d "recipient=6281234567890" \ -d "sender_id=YourName" \ -d "message=[MyApp] Kode OTP kamu adalah 567890, berlaku selama 5 menit. Demi keamanan jangan pernah berbagi dengan siapapun"

$recipient = '6281234567890'; $message = 'Kode OTP kamu adalah : 14563, berlaku selama 5 menit. Demi keamanan jangan pernah berbagi dengan siapapun.'; $message = urlencode($message); $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://dnymobile.com/api/v3/wa/send?recipient=".$recipient."&message=".$message, 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_HTTPHEADER => array( 'Accept: application/json', 'Authorization: Bearer 1|Fqst3gA0P1BxPxxxxxxjuOYhiJBNPAqob7I6IEqn ' //masukkan token anda ), )); $response = curl_exec ($curl); curl_close($curl); echo $response; ?>
Example Returns if the request was successfull

{
"status":"success",
"message":"Your message data was accepted",
"data":
{
"uid":"633049e4d3d0f",
"to":"6281234567890",
"message":"Kode OTP kamu adalah : 14563, berlaku selama 5 menit. Demi keamanan jangan pernah berbagi dengan siapapun.",
"status":"InQueue",
"cost":"0"
}
}
Example Returns if the request failed

{
"status":"error",
"message":"The given data was invalid."
}
Webhook

Dengan fasilitas Webhook kamu dapat menerima update status pesan yang telah kamu kirimkan. Untuk menambah/edit url webhook, silakan masuk ke menu profile yang dapat diakses dari menu kanan atas.

Webhook Parameter
Parameter Description
$uid Unique identification for a message given at the time of submission.
$recipient Destination number of the message
$status Status of the message: InQueue, Sent, Pending, Delivered, Read, undelivered
$statusdesc Description of satus message
WhatsApp-Button