SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Can I share my location or receive location information on WhatsApp?

The Twilio API for WhatsApp supports sending and receiving GPS location data in messages to WhatsApp users. This guide explains how it's done.

Send location data

You can send a location in a Session message by including the PersistentAction parameter in your API requests. In these location messages, the message body will be used as the name of the location. You can also include an optional label. Here are usage examples:

Send location PersistentAction=geo:{latitude},{longitude}
Send location w/label PersistentAction=geo:{latitude},{longitude}|{label}

For full details and code samples, see Location Messages with WhatsApp (Twilio Docs).

Notice: Location sending is currently only supported in Session Messages. Location cannot be included on a Template message.

Receive location data

End users can also send a location message to your Twilio WhatsApp number. This data will be included in the HTTP POST request for the incoming message that we send to your webhook.

It is important to note that this location data is not available via a REST API fetch request to the Message resource at a later time. Later attempts to fetch location via the API will result in receiving an empty location, which can be expected.

The following additional parameters are added to incoming location messages:

  • Latitude
  • Longitude
  • Address
  • Label

Notice: Location data from messages is not visible in Console at this time.

Have more questions? Submit a request
Powered by Zendesk