Location messages appear as interactive map pins in WhatsApp, allowing recipients to open the location in their preferred maps application.
Endpoint
Headers
Device identifier for multi-device support. Required when multiple devices are registered.
Must be
application/json.Request Body
Phone number with country code and WhatsApp suffix.Format:
{country_code}{phone_number}@s.whatsapp.netExample: [email protected]Latitude coordinate in decimal degrees.Range: -90 to 90Example:
"-7.797068"Must be provided as a string, not a number.
Longitude coordinate in decimal degrees.Range: -180 to 180Example:
"110.370529"Must be provided as a string, not a number.
Mark the message as forwarded.
Disappearing message duration in seconds (optional).Common values:
86400- 24 hours604800- 7 days7776000- 90 days
Response
Response status code. Returns
"SUCCESS" on successful send.Human-readable response message.
Code Examples
Response Example
Understanding Coordinates
Latitude
- Range: -90° (South Pole) to +90° (North Pole)
- Equator: 0°
- Northern Hemisphere: Positive values
- Southern Hemisphere: Negative values
- New York:
40.7128° - Sydney:
-33.8688° - London:
51.5074°
Longitude
- Range: -180° (West) to +180° (East)
- Prime Meridian: 0° (Greenwich, UK)
- Eastern Hemisphere: Positive values
- Western Hemisphere: Negative values
- New York:
-74.0060° - Tokyo:
139.6917° - London:
-0.1278°
Decimal Degrees Format
Coordinates should be in decimal degrees format:Use Cases
Business Location Sharing
Share your business or store location with customers:Delivery & Logistics
Send delivery locations or pickup points:Event Venues
Share event locations with attendees:Meeting Coordination
Share meeting locations or rendezvous points:Tourist Attractions
Share points of interest or tourist spots:Getting Coordinates
From Google Maps
- Open Google Maps
- Right-click on the location
- Click on the coordinates shown
- Coordinates are copied to clipboard
- Format:
latitude, longitude
From Mobile Device
- Open Maps app on phone
- Long-press on location
- Coordinates appear at top
- Copy and use in API call
Programmatically
From Address (Geocoding)
Use geocoding services to convert addresses to coordinates:Location Display in WhatsApp
Recipients will see:- Map Preview: Static map image with pin
- Coordinates: Latitude and longitude
- Open in Maps: Button to open in device’s map app
- Get Directions: Option to navigate to location
- Share Location: Ability to forward location
Interactive Features
- Tap to view full map
- Get directions from current location
- View nearby places
- Share location with others
- Save location for later
Best Practices
-
Precision
- Use 6-7 decimal places for meter-level precision
- Don’t over-specify (8+ decimals is excessive)
- Example:
"-7.797068"(6 decimals = ~11cm precision)
-
Validate Coordinates
-
Add Context
- Send a text message before the location
- Explain what the location is for
- Provide additional details
-
String Format
- Always send coordinates as strings
- Include quotes in JSON
- Maintain decimal precision
-
Test Locations
- Verify coordinates before sending
- Check location on map preview
- Ensure pin is in correct location
Famous Locations Examples
Landmarks
Major Cities
Limitations
- Static Location Only: Cannot send live location tracking
- No Address: Only coordinates, no street address included
- No Place Name: Cannot specify venue or business name
- Map Provider: WhatsApp chooses the map provider (varies by region)
- Network Required: Recipient needs internet to view map
Coordinate Precision Guide
| Decimal Places | Precision | Example Use Case |
|---|---|---|
| 0 | ~111 km | Country |
| 1 | ~11 km | City |
| 2 | ~1.1 km | Town/Village |
| 3 | ~110 m | Large Building |
| 4 | ~11 m | Land Parcel |
| 5 | ~1.1 m | Tree/Person |
| 6 | ~11 cm | Recommended |
| 7 | ~1.1 cm | High Precision |
| 8+ | <1 cm | Excessive |
For most use cases, 6 decimal places provide sufficient precision (~11cm accuracy).
Error Responses
Common causes:
- Invalid phone number format
- Missing latitude or longitude
- Invalid coordinate format (not a string)
- Coordinates out of valid range
- Non-numeric coordinate values
Common causes:
- Device not connected
- Network connectivity issues
- WhatsApp service temporarily unavailable
Troubleshooting
Wrong Location Displayed
- Verify latitude and longitude are correct
- Check you haven’t swapped lat/lng
- Ensure proper decimal format
- Verify coordinates are in valid range
- Test coordinates in Google Maps first
Coordinates Rejected
- Check format is string, not number
- Verify no extra spaces or characters
- Ensure decimal point (not comma)
- Check latitude is between -90 and 90
- Check longitude is between -180 and 180
Map Not Loading
- Recipient needs internet connection
- Check recipient’s map app is installed
- Verify WhatsApp has location permissions
- Try re-sending the location
Related Endpoints
- Send Link - Send links with preview
- Send Contact - Share contact cards
- Send Text - Send text messages
- User Info - Get user information
