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(ctx, chatID) (*LocationRequestResponse, error)
POST/v3/chats/{chatId}/location/request
Get location data
client.Chats.Location.Get(ctx, chatID) (*GetChatLocationResponse, error)
GET/v3/chats/{chatId}/location
ModelsExpand Collapse
type GetChatLocationResponse struct{…}
Data GetChatLocationResponseData
Features []GetChatLocationResponseDataFeature
Geometry GetChatLocationResponseDataFeatureGeometry
Coordinates []float64

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

Type string
Properties GetChatLocationResponseDataFeatureProperties
Handle string

Phone number or email of the person sharing their location

Address stringOptional

Full street address

Locality stringOptional

City or locality name

UpdatedAt TimeOptional

When the location was last updated

formatdate-time
Type string
Type string
Success bool
type LocationRequestResponse struct{…}
Message string
Success bool