Skip to main content
Request users to share their current location. Displays a “Send Location” button in WhatsApp.
import { WhatsAppClient } from '@kapso/whatsapp-cloud-api';

const client = new WhatsAppClient({
  baseUrl: 'https://api.kapso.ai/meta/whatsapp',
  kapsoApiKey: process.env.KAPSO_API_KEY!
});

await client.messages.sendLocationRequest({
  phoneNumberId: '647015955153740',
  to: '15551234567',
  bodyText: 'Please share your location so we can provide accurate delivery estimates.'
});

Response handling

When the user shares their location, you’ll receive a webhook with:
{
  "type": "location",
  "location": {
    "latitude": 37.7749,
    "longitude": -122.4194,
    "name": "Optional location name",
    "address": "Optional address"
  }
}

Use cases

  • Delivery services requesting drop-off locations
  • Store locators finding nearest branches
  • Field service appointments
  • Event check-ins