location.geoip.decode

The location.geoip.decode command is used to decode a location from an IP address

TR50 Request

{
  "cmd": {
    "command": "location.geoip.decode",
    "params": {
      "ipAddress": "12.105.107.1"
    }
  }
}

Request Parameters

Name Type Required Description
ipAddress String Yes IP address location to extract the geolocation

TR50 Response

If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.

{
  "cmd": {
    "success": true,
    "params": {
      "acc": 20000,
      "city":"Pompano Beach",
      "country":"United States",
      "lat":26.3033,
      "lng":-80.2276
    }
  }
}

Request Publish Object

Name Type Description
acc String The accuracy of the location
city String The city of the location
country String The country of the location
lat Float64 The latitude for this location
lng Float64 The longitude for this location