location
To send a specific location, use the location
reply type.
tip
You can also use the equivalent
$reactions.location
method.Properties
Property | Type | Required | Description |
---|---|---|---|
lat | Number | Yes | Latitude. |
lon | Number | Yes | Longitude. |
Syntax
{
"type": "location",
"lat": 40.758896,
"lon": -73.985130
}
Channel restrictions
location
is only supported in the following channels:
- Chat API
- Telegram
- Viber
- edna WhatsApp 2.0
How to use
state: Location
intent: /Location
a: Visit New York’s Empire State Building!
script:
$response.replies = $response.replies || [];
$response.replies.push({
"type": "location",
"lat": 40.7484,
"lon": -73.9854
});