Turn on the Geolocation feature:
- Enable Geolocation for iOS if needed.
To start using background location tracking. You need to enable a Geolocation and fill out the Permission description for iOS (If you're planning to use iOS).
To make background location tracking work correctly, you need to ask the user to give Always allow permission. The system will handle that for you, but make sure you specify it in the permission description for Android. For iOS OS will ask users to allow background tracking automatically once they collapse that app.
- Webhook URL - This is your endpoint URL where we will send a user's geolocation. A few requirements for an endpoint:
- HTTPS (HTTP is not supported)
- POST method
- JSON in a body
// JSON of what you should expect to be received from a device
// Identifier that will be passed later (Check Integration for more details)
// Error can be null or string (which will contain an error message)
"error": null // "Data Discarded", "Timeout", "Authorization Needed", "Internal Server Error", "Parsing Error", "User Cancelled", "Invalid/Missing API Key", "Quota limit reached", "Not Found", "Reserved IP", "Not Supported", "Invalid polygon. Must be 1 or more points", "Network error: \(statusCode)"
- Header Name & Value (Optional) - In case you have authorization on your webhook endpoint. This header will be sent to your endpoint from a device.
Yes, we advise using the native geolocation API for an enhanced user experience, but the web geolocation API is also an option, albeit with repeated permission prompts each time the app is accessed.