To interact with our API you always need an API token. Every time you send a HTTP REST request to our API, you need to add a Authorization header to your request. The value of the header is your API token as a x-api-key token.
You should also always add a Accept and Content-Type header to ensure to send and receive JSON!
| Header Name | Header Value |
|---|---|
| x-api-key | your-api-token |
| Accept | application/json |
| Content-Type | application/json |
const raw = JSON.stringify({
"number": "918849036222",
"message": "Hello from whatsme"
});
const requestOptions = {
method: "POST",
headers: {
"Content-Type" : "application/json",
"x-api-key" : "Your API Key"
},
body: raw,
};
fetch("https://whatsme.in/api/v1/send_message", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://whatsme.in/api/v1/send_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 =>'{
"number":"918849036222",
"message":"Hello from whatsme"
}',
CURLOPT_HTTPHEADER => array(
'x-api-key: "Your API Key"',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;import requests
import json
url = "https://whatsme.in/api/v1/send_message"
payload = json.dumps({
"number": "918849036222",
"message": "Hello from whatsme"
})
headers = {
'x-api-key': 'Your API Key',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)curl --location 'https://whatsme.in/api/v1/send_message' \
--header 'x-api-key: Your Api Key' \
--header 'Content-Type: application/json' \
--data '{
"number":"918849036222",
"message":"Hello from whatsme"
}'Login to your account. If you do not have an account yet, create a new account and verify your email address.
Please ensure that you have subscribed to one of our billing plans. You can also use our trial version to get familiar with our API.
Go to the “Session” section and create a new session if you haven’t already. Once your session is created, find the session you just crate and click its setting icon. You’ll then see a “Get API Key” button. Click this button to generate and view your new API token.
Step 1:

Step 2:

Step 3:
