twilio/location
The twilio/location content type allows you to send a location pin and an optional label, which you can use to enhance delivery notifications or provide location information to recipients.
(information)
Info
You can send location templates during an active 24-hour session with the recipient. You can't use them to initiate a business-initiated session.
Location templates aren't supported for approval on WhatsApp and can't be submitted for approval.

| Parameter | Type | Required | Variable support | Description |
|---|---|---|---|---|
longitude | Number | Yes | No | The longitude value of the location pin to send. Value must be between -180.0 and +180.0. |
latitude | Number | Yes | No | The latitude value of the location pin to send. Value must be between -90.0 and +90.0. |
label | String | No | Yes | Label to be displayed to the recipient alongside the location pin. |
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createContent() {11const content = await client.content.v1.contents.create({12friendly_name: "owl_air_location",13language: "en",14types: {15"twilio/text": {16body: "Owl Air: Time to board, SFO is located at San Francisco International Airport, P.O. Box 8097, San Francisco, CA 94128 ",17},18"twilio/location": {19latitude: 37.62159755922449,20longitude: -122.37888566473057,21label: "Time to Board @ SFO",22},23},24});2526console.log(content.dateCreated);27}2829createContent();
Response
1{2"sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"friendly_name": "owl_air_location",5"language": "en",6"variables": {7"name": "foo"8},9"types": {10"twilio/text": {11"body": "Owl Air: Time to board, SFO is located at San Francisco International Airport, P.O. Box 8097, San Francisco, CA 94128 "12},13"twilio/location": {14"latitude": 37.62159755922449,15"longitude": -122.37888566473057,16"label": "Time to Board @ SFO"17}18},19"url": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",20"date_created": "2015-07-30T19:00:00Z",21"date_updated": "2015-07-30T19:00:00Z",22"links": {23"approval_create": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests/whatsapp",24"approval_fetch": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests"25}26}