## Request location sharing

`client.Chats.Location.Request(ctx, chatID) (*LocationRequestResponse, error)`

**post** `/v3/chats/{chatId}/location/request`

Request a contact in a chat to share their location. They receive an iMessage
prompt and must accept before any location is available; once they do, read their
location coordinates with `GET /v3/chats/{chatId}/location`.

The request is delivered asynchronously. The endpoint returns immediately with
`{ "success": true, "message": "Location request sent" }` and does not return
coordinates.

Rejected with `409` if the recipient is already sharing — read their
location with `GET /v3/chats/{chatId}/location` instead of re-requesting.

Rate limited per chat, since each request prompts the recipient's device.
Exceeding it returns `429` with a `Retry-After` header.

Location requests only work in **1:1 iMessage chats** (Apple limitation):

- Group chats (any service) return `409` with code `2016`
  (`GroupChatNotSupported`).
- 1:1 SMS and RCS chats return `409` with code `2017`
  (`ChatServiceNotSupported`).

### Parameters

- `chatID string`

### Returns

- `type LocationRequestResponse struct{…}`

  - `Message string`

  - `Success bool`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/linq-team/linq-go"
  "github.com/linq-team/linq-go/option"
)

func main() {
  client := linqgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  locationRequestResponse, err := client.Chats.Location.Request(context.TODO(), "975d0776-bd17-4273-8337-f346b4c661b0")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", locationRequestResponse.Message)
}
```

#### Response

```json
{
  "success": true,
  "message": "Location request sent"
}
```
