Find nearby servers
Discover game servers near the client's geographic location based on IP geolocation.
Authorization
BearerAuth AuthorizationBearer <token>
JWT access token obtained via logging in with an identity provider.
In: header
Header Parameters
Connect-Protocol-Version*number
Define the version of the Connect protocol
Value in
1Connect-Timeout-Ms?number
Define the timeout, in ms
Request Body
application/json
[key: string]?never
Response Body
application/json
application/json
curl -X POST "https://server-api.sagl.app/serversapi.v1.StatisticsService/NearbyServers" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{}'{
"servers": [
{
"id": "string",
"hostname": "string",
"onlinePlayers": 0,
"maxPlayers": 0,
"country": "string",
"latitude": 0.1,
"longitude": 0.1,
"distanceMi": 0.1
}
],
"currentLatitude": 0.1,
"currentLongitude": 0.1
}{
"code": "not_found",
"message": "string",
"details": [
{
"type": "string",
"value": "string",
"debug": {}
}
]
}