//Geo / IP API
Geo / IP API
Returns the caller's IP address, which can be used to pre-fill timezone and country fields during registration.
GET /api/geo/ip
No authentication required.
GET /api/geo/ip
Accept: application/json # or application/x-flatbuffers
Response 200 OK
{
"data": {
"ip": "203.0.113.42",
"country": "",
"timezone": ""
}
}
> Note country and timezone fields are reserved for future
> GeoIP enrichment. The IP is extracted from X-Forwarded-For /
> X-Real-IP headers set by your load balancer.
FlatBuffers
Add Accept: application/x-flatbuffers to receive the binary response
(file identifier: GEOI). Schema: schema/geo.fbs.
Rust SDK
let geo = client.get_client_ip().await?;
println!("Client IP: {}", geo.ip);