---
title: "Request user location"
description: "Ask a customer to share their location."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.wazapin.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Request user location

Ask the customer to share their live location — useful for delivery routing, dispatch, or field service scheduling.

## At a glance

| Item | Detail |
| --- | --- |
| `type` | `location_request` |
| Channel support | Official and unofficial |
| Body | `content.body` or `content.text` |

## Request body

| Field | Required | Description |
| --- | --- | --- |
| `channel_id` | Yes | Sender channel ID |
| `to` | Yes | Recipient phone number |
| `type` | Yes | `location_request` |
| `content.body` | Yes | Prompt text shown to the user |

## Example

### cURL

```bash
curl -X POST "https://api.wazapin.com/v1/messages" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
"channel_id": "wzp_abc123",
"to": "6281234567890",
"type": "location_request",
"content": {
  "body": "Boleh share lokasi kamu sekarang?"
}
  }'
```
### TypeScript

```typescript
import { WazapinClient } from "@wazapin/sdk";

const wazapin = new WazapinClient({ apiKey: process.env.WAZAPIN_API_KEY! });

await wazapin.messages.send({
  channel_id: "wzp_abc123",
  to: "6281234567890",
  type: "location_request",
  content: { body: "Boleh share lokasi kamu sekarang?" },
});
```
### Python

```python
import requests

requests.post(
"https://api.wazapin.com/v1/messages",
headers={"X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
json={
    "channel_id": "wzp_abc123",
    "to": "6281234567890",
    "type": "location_request",
    "content": {"body": "Boleh share lokasi kamu sekarang?"},
},
timeout=30,
).raise_for_status()
```

:::info
When the user replies, see [Handle inbound text](/guides/handle-inbound-text) or [Handle interactive replies](/guides/handle-interactive-replies).
:::

Source: https://docs.wazapin.id/getting-started/request-user-location/index.mdx
