Location Request Message
Last updated
Last updated
You can only send a interactive message up until 24 hours after receiving a message from the user. If you have not received a message from the user within this time, you will need to start a new conversation by sending a Template message.
Location request messages are free-form messages displaying only a body text and a send location button. When a WhatsApp user taps the button, a location sharing screen appears which the user can then use to share their location.
Once the user shares their location, a messages webhook is triggered, containing the user's location details to the business.
POST
https://waba-v2.360dialog.io/messages
To send a message, use the request URL and the following body parameters.
Name | Type | Description |
---|---|---|
recipient_type | string | individual |
to | string |
|
type | string |
|
messaging_product | string | Required only for Cloud API.
Messaging service used for the request. Use |
interactive | object |
Placeholder | Description | Example Value |
---|---|---|
String | Required. Message body text. Supports URLs. 4096 characters maximum. |
|
Example Request
As announced in November 2023, Meta is transitioning to a fully Cloud-hosted WhatsApp Business Platform and will stop supporting On-Premise API in October 2025.
Starting from On-Premise client v2.53, all new feature updates will be exclusively delivered to Cloud API. While the On-Premise API client will receive quarterly releases, they will focus solely on bug fixes and security patches. From May 15, 2024, 360dialog will not allow for new numbers to be onboarded with On-Premise API. We will continue supporting already registered On-Premise API throughout 2024, but we strongly recommend to start changing the hosting type of numbers to Cloud as soon as possible. Learn here how to integrate with Cloud API.
POST
https://waba.360dialog.io/v1/messages
To send a message, use the request URL and the following body parameters.
Name | Type | Description |
---|---|---|
recipient_type | string | individual |
to* | string | wa_id of the contact you want to message |
body.type | string |
|
body.text | object | contains body field |
action.name | String |
If your message is sent successfully, you get the following response:
When a WhatsApp user shares their location in response to your message, a messages webhook is triggered containing the user's location details. See Receiving messages via Webhook.
The location
component within the payload contains the user's latitude and longitude. Note that address
and name
are optional for the user and may not be included.
Placeholder | Description | Example Value |
---|---|---|
String | Location address.
This parameter will only appear if the WhatsApp user chooses to share it. |
|
Number | Location latitude in decimal degrees. |
|
Number | Location longitude in decimal degrees. |
|
String | Location name.
This parameter will only appear if the WhatsApp user chooses to share it. |
|
String | UNIX timestamp indicating when our servers processed the WhatsApp user's message. |
|
String | WhatsApp Business Account ID. |
|
String | WhatsApp business phone number's display number. |
|
String | WhatsApp business phone number. |
|
String | WhatsApp business phone number ID. |
|
String | WhatsApp message ID of message that the user is responding to. |
|
String | WhatsApp message ID of the user's message. |
|
String | WhatsApp user's WhatsApp ID. |
|
String | WhatsApp user's name. |
|
Example Webhook