const raw = JSON.stringify({
"number": "918849036222",
"document_url": "https://example.com/path/to/example.png"
});
const requestOptions = {
method: "POST",
headers: {
"Content-Type" : "application/json",
"x-api-key" : "Your API Key"
},
body: raw,
};
fetch("https://whatsme.in/api/v1/send_image_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_image_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",
"image_url": "https://example.com/path/to/example.png"
}',
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_image_message"
payload = json.dumps({
"number": "918849036222",
"image_url": "https://example.com/path/to/example.png"
})
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_image_message' \
--header 'x-api-key: Your Api Key' \
--header 'Content-Type: application/json' \
--data '{
"number":"918849036222",
"image_url": "https://example.com/path/to/example.png"
}'