Dokumentasi API

WANotif Whatsapp Chat BOT - Dokumentasi API

Dokumentasi API

DOC API eViral WA BOT

Text Message Only

$curl = curl_init();

curl_setopt_array($curl, array(

  CURLOPT_URL => 'https://wabot.eviral.top/api/create-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_POSTFIELDS => array(

  'appkey' => '85fca0a6-33cd-a1f2-4288-0b2558a724db',

  'authkey' => 'P571GG0R9gMsMdvj9ftjgmRECf8lUl9QI8f8PPNHL3fz7MD5B3',

  'to' => 'RECEIVER_NUMBER',

  'message' => 'Example message',

  'sandbox' => 'false'

  ),

));

$response = curl_exec($curl);

curl_close($curl);

echo $response;


Text Message with file

$curl = curl_init();

 

curl_setopt_array($curl, array(

  CURLOPT_URL => 'https://wabot.eviral.top/api/create-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_POSTFIELDS => array(

  'appkey' => '85fca0a6-33cd-a1f2-4288-0b2558a724db',

  'authkey' => 'P571GG0R9gMsMdvj9ftjgmRECf8lUl9QI8f8PPNHL3fz7MD5B3',

  'to' => 'RECEIVER_NUMBER',

  'message' => 'Example message',

  'file' => 'https://www.africau.edu/images/default/sample.pdf',

  'sandbox' => 'false'

  ),

));

 

$response = curl_exec($curl);

 

curl_close($curl);

echo $response;


 

Template Message Only

$curl = curl_init();

 

curl_setopt_array($curl, array(

  CURLOPT_URL => 'https://wabot.eviral.top/api/create-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_POSTFIELDS => array(

  'appkey' => '85fca0a6-33cd-a1f2-4288-0b2558a724db',

  'authkey' => 'P571GG0R9gMsMdvj9ftjgmRECf8lUl9QI8f8PPNHL3fz7MD5B3',

  'to' => 'RECEIVER_NUMBER',

  'template_id' => 'TEMPLATE_ID',

  'variables' => array(

    '{variableKey1}' => 'Jhone',

    '{variableKey2}' => 'replaceable value'

   )

  ),

));

 

$response = curl_exec($curl);

 

curl_close($curl);

echo $response;


Successful Json Callback

{

    "message_status": "Success",

    "data": {

        "from": "SENDER_NUMBER",

        "to": "RECEIVER_NUMBER",

        "status_code": 200

    }

}


Text Message Only

curl --location --request POST 'https://wabot.eviral.top/api/create-message' \

--form 'appkey="85fca0a6-33cd-a1f2-4288-0b2558a724db"' \

--form 'authkey="P571GG0R9gMsMdvj9ftjgmRECf8lUl9QI8f8PPNHL3fz7MD5B3"' \

--form 'to="RECEIVER_NUMBER"' \

--form 'message="Example message"' \


Text Message with file

curl --location --request POST 'https://wabot.eviral.top/api/create-message' \

--form 'appkey="85fca0a6-33cd-a1f2-4288-0b2558a724db"' \

--form 'authkey="P571GG0R9gMsMdvj9ftjgmRECf8lUl9QI8f8PPNHL3fz7MD5B3"' \

--form 'to="RECEIVER_NUMBER"' \

--form 'message="Example message"' \

--form 'file="https://www.africau.edu/images/default/sample.pdf"'


Template Only

curl --location --request POST 'https://wabot.eviral.top/api/create-message' \

--form 'appkey="85fca0a6-33cd-a1f2-4288-0b2558a724db"' \

--form 'authkey="P571GG0R9gMsMdvj9ftjgmRECf8lUl9QI8f8PPNHL3fz7MD5B3"' \

--form 'to="RECEIVER_NUMBER"' \

--form 'template_id="TEMPLATE_ID"' \

--form 'variables[{variableKey1}]="jhone"' \

--form 'variables[{variableKey2}]="replaceable value"'



Successful Json Callback

{

    "message_status": "Success",

    "data": {

        "from": "SENDER_NUMBER",

        "to": "RECEIVER_NUMBER",

        "status_code": 200

    }

}


Text Message Only

var request = require('request');

var options = {

  'method': 'POST',

  'url': 'https://wabot.eviral.top/api/create-message',

  'headers': {

  },

  formData: {

    'appkey': '85fca0a6-33cd-a1f2-4288-0b2558a724db',

    'authkey': 'P571GG0R9gMsMdvj9ftjgmRECf8lUl9QI8f8PPNHL3fz7MD5B3',

    'to': 'RECEIVER_NUMBER',

    'message': 'Example message'

  }

};

request(options, function (error, response) {

  if (error) throw new Error(error);

  console.log(response.body);

});


Text Message With File

var request = require('request');

var options = {

  'method': 'POST',

  'url': 'https://wabot.eviral.top/api/create-message',

  'headers': {

  },

  formData: {

    'appkey': '85fca0a6-33cd-a1f2-4288-0b2558a724db',

    'authkey': 'P571GG0R9gMsMdvj9ftjgmRECf8lUl9QI8f8PPNHL3fz7MD5B3',

    'to': 'RECEIVER_NUMBER',

    'message': 'Example message',

    'file': 'https://www.africau.edu/images/default/sample.pdf'

  }

};

request(options, function (error, response) {

  if (error) throw new Error(error);

  console.log(response.body);

});


 

Template Only

var request = require('request');

var options = {

  'method': 'POST',

  'url': 'https://wabot.eviral.top/api/create-message',

  'headers': {

  },

  formData: {

    'appkey': '85fca0a6-33cd-a1f2-4288-0b2558a724db',

    'authkey': 'P571GG0R9gMsMdvj9ftjgmRECf8lUl9QI8f8PPNHL3fz7MD5B3',

    'to': 'RECEIVER_NUMBER',

    'template_id': 'SELECTED_TEMPLATE_ID',

    'variables': {

        '{variableKey1}' : 'jhone',

        '{variableKey2}' : 'replaceable value'

    }

  }

};

request(options, function (error, response) {

  if (error) throw new Error(error);

  console.log(response.body);

});


Successful Json Callback

{

    "message_status": "Success",

    "data": {

        "from": "SENDER_NUMBER",

        "to": "RECEIVER_NUMBER",

        "status_code": 200

    }

}


import requests
url = "https://wabot.eviral.top/api/create-message"
payload={
'appkey': '85fca0a6-33cd-a1f2-4288-0b2558a724db',
'authkey': 'P571GG0R9gMsMdvj9ftjgmRECf8lUl9QI8f8PPNHL3fz7MD5B3',
'to': 'RECEIVER_NUMBER',
'message': 'Example message',
}
files=[
]
headers = {}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)

Successful Json Callback

{
    "message_status": "Success",
    "data": {
        "from": "SENDER_NUMBER",
        "to": "RECEIVER_NUMBER",
        "status_code": 200
    }
}

Parameters    

S/N

VALUE

TYPE

REQUIRED

DESCRIPTION

1,

appkey

string

Yes

Used to authorize a transaction for the app

2.

authkey

string

Yes

Used to authorize a transaction for the is valid user

3.

to

number

Yes

Nomor Penerima WhatsApp

4.

template_id

string

No

Used to authorize a transaction for the template

5.

message

string

No

The transactional message max:1000 words

6.

file

string

No

file extension type should be in jpg,jpeg,png,webp,pdf,docx,xlsx,csv,txt

7.

variables

Array

No

the first value you list replaces the {1} variable in the template message and the second value you list replaces the {2} variable

 

 

Files