Location messages

To send a location message to a user use the location object, which contains the following fields:

FieldRemarks
LatitudeThe latitude in degrees
LongitudeThe longitude in degrees
SearchQueryThe address to display
LabelThe label to display at the pin
Location message

Location message

In the example below, we send a location message.

{
    "messages": {
        "msg": [
            {
                "body": {
                    "type": "auto",
                    "content": "Fallback Text"
                },
                "to": [
                    {
                        "number": "00316012345678"
                    }
                ],
                "from": "00316098765432",
                "allowedChannels": ["WhatsApp"],
                "richContent": {
                    "conversation": [
                        {
                            "location": {
                                "latitude": "51.603802",
                                "longitude": "4.770821",
                                "label": "CM HQ",
                                "searchQuery": "Konijnenberg 30"
                            }
                        }
                    ]
                }
            }
        ]
    }
}

OSZAR »