Skip to content
Get started

Location

Request and retrieve real-time location data via iMessage.

Use these endpoints to request a contact’s location, retrieve location data for contacts who are sharing with you, and subscribe to webhooks when someone starts or stops sharing their location.

Coordinates are returned in GeoJSON format: [longitude, latitude] or [longitude, latitude, altitude] if altitude is available.

Request location sharing
client.chats.location.request(stringchatID, RequestOptionsoptions?): LocationRequestResponse { message, success }
POST/v3/chats/{chatId}/location/request
Get location data
client.chats.location.retrieve(stringchatID, RequestOptionsoptions?): GetChatLocationResponse { data, success }
GET/v3/chats/{chatId}/location
ModelsExpand Collapse
GetChatLocationResponse { data, success }
data: Data { features, type }
features: Array<Feature>
geometry: Geometry { coordinates, type }
coordinates: Array<number>

[longitude, latitude] or [longitude, latitude, altitude]

type: "Point"
properties: Properties { handle, address, locality, updated_at }
handle: string

Phone number or email of the person sharing their location

address?: string

Full street address

locality?: string

City or locality name

updated_at?: string

When the location was last updated

formatdate-time
type: "Feature"
type: "FeatureCollection"
success: boolean
LocationRequestResponse { message, success }
message: string
success: boolean