Location Request Message
Request a user's location through WhatsApp.
Basic Usage
Parameters
Everything inside platforms.meta_whatsapp
should be considered parameters for this notification. There are top level
parameters that describe the message type and other general message behaviours, and then there are nested parameters
dependent on the message type.
Only message_type
and nested parameters for message_type: location_request
is explained here, for all top level parameters, see the top level
Whatsapp documentation
required string
message_type Indicates the type of message that is going to be sent. This also will determine what the contents of the params object should be.
Available message types are:
required object
params Contains the parameters for the message and will depend on the message_type
setting.
See the message_type
specific documentation above for the message type specific parameters.
Show child attributes
required object
location_request Object is required if the message_type
is location_request. This object should change to match what message_type
is set to.
Show child attributes
required string
body Contains the message text that will be sent along with the location request. This text explains to the user why their location is being requested.
Result
When a user receives a location request message, they will see the message body along with an option to share their current location. The user can choose to:
- Share their current location
- Share a different location by searching for an address
- Decline to share their location
If the user shares their location, it will be returned as a location message that can be processed by your system.
Examples
Request pickup location
This example requests the user's location for a pickup service:
Request delivery location
This example requests a delivery address from the customer: