Use the numbers node to get your WhatsApp phone numbers.
This document covers:
Calls to the message API are sent to the /numbers endpoint regardless of the numbers. See the below documentation for information:
GET https://webservice.woztell.com/webhook/numbers
{
"WOZTELL_ADMIN":"your-woztell-admin-email",
"WOZTELL_TOKEN":"your-woztell-token" }
Parameters:
Parameter name | Data type | Description | Possible Values |
WOZTELL_ADMIN* | String | Email address of your Woztell account. | |
WOZTELL_TOKEN* | String | Your Woztell account token. | abc-defgh-ijk-123 |
* Required parameters.
Response
Information about error types and status messages is detailed below:
STATUS | DESCRIPTION |
ERROR | METHOD NOT ALLOWED |
ERROR | INVALID AUTHORIZATION |
{"STATUS":"ERROR",
"DESCRIPTION":"INVALID JSON DATA" }
STATUS | NUMBERS |
SUCCESS | JSON with numbers |
{"STATUS":"SUCCESS",
"NUMBERS": {
"0": {
"NUMBER": "0016315551002",
"DESCRIPTION": "USA"
},
...
"N": {
"NUMBER": "0034666777888",
"DESCRIPTION": "SPAIN"
} }
Parameter name | Data type | Description | Possible Values |
NUMBER | String | Your WhatsApp phone number. Always in an international format. | 0016315551002, 0034666777888, ... |
DESCRIPTION | String | Description of the WhatsApp phone number. The description will be defined by the customer when subscribing to the service. | "USA", "Sales department", "Spain team",.... |
When a message is sent in a request, the customer will receive a message like this:
GET https://webservice.woztell.com/webhook/messages
{
"WOZTELL_ADMIN":"admin@woztell.com",
"WOZTELL_TOKEN":"123-45678-90abcdefg-hij-klmn" }
You can use this PHP to send WhatsApp messages using your Woztell account:
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://webservice.woztell.com/webhook/templates?WOZTELL_ADMIN=admin@woztell.com&WOZTELL_TOKEN=123-45678-90abcdefg-hij-klmn',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET'
));
$response = curl_exec($curl);
curl_close($curl); echo $response;