I'm trying to send a location request message using the WhatsApp API but it's not working The message prompts the user to enter their location via a location pin.
I've used meta's docs for reference. I don't receive an error in the response either, which leads me to believe you either have to have certain privileges to send these messages, or the API is simply broken.
The payload looks like this:
{
"recipient_type": "individual",
"to": "<phone number>",
"type": "interactive",
"interactive": {
"type": "location_request_message",
"body": {"type": "text", "text": "<text>"},
"action": {"name": "send_location"}
}
}
Steps to reproduce:
- Use a sandbox, like 360dialog
- Get an API key
- Send a message to the bot to provide permission to the bot to send messages back.
- Send the location request message.