Location Message
Send Location Message
POST https://api.wapim.io/api/v1/whatsapp/message/location
Headers
Name
Type
Description
Token*
YOUR_WAPIM_TOKEN
Request Body
Name
Type
Description
phone_number*
String
Recipient Phone Number or Group ID
lat*
String
Latitude Coordinate as Float
reply_to
String
Message ID To Reply
lon*
String
Longitude Coordinate as Float
title
String
Name of Place
{
"status": true,
"code": 200,
"phone_number": "*****",
"message_id": "3EB05F28F824A6F6D9E9",
"req_id": "11b80f89-fff7-487c-b33f-047daff89af6"
}{
"status": false,
"code": 400,
"message": "Bad Request",
"error": {
"Send Location": [
"Malformed or missing phone id or bad coordinates!"
]
}
}curl
-X POST https://api.wapim.io/api/v1/whatsapp/message/location
-H 'Token: YOUR_WAPIM_TOKEN'
-d '{"phone_number": "PHONENUMBER_OR_GROUPID", "lat": 40.755884, "lon": -73.978504}'const axios = require('axios');
axios
.post(
'https://api.wapim.io/api/v1/whatsapp/message/location',
{
phone_number: 'PHONENUMBER_OR_GROUPID',
lat: 40.755884,
lon: -73.978504,
title: 'This is place name'
},
{
headers: {
token: 'YOUR_WAPIM_TOKEN',
}
}
)
.then(response => console.log(response.data))
.catch(error => console.log(error.response.data))Last updated