Esri's Geotrigger Service is replacing Geoloqi! Learn More | FAQ

share/last

Contents

URL

https://api.geoloqi.com/1/share/last

Description

Access the last location of a user given one or more shared tokens

Supported Request Methods

GET

Parameters

  • geoloqi_token
    One or more tokens. If specifying multiple tokens, they must be comma-separated with no spaces.
  • after
    Only points after this date will be returned.

Example Requests

http://api.geoloqi.com/1/share/last?geoloqi_token=1111111,2222222,3333333

http://api.geoloqi.com/1/share/last?geoloqi_token=1111111

http://api.geoloqi.com/1/share/last?geoloqi_token=1111111,2222222&after=2011-09-22T20:00:00-0800

Response

Success

If you requested only one user's locations, you will get a response like the following.

HTTP/1.1 200 OK
 
{
  "uuid":"ffa3555c-1bbd-45aa-9870-bdbe49daf678",
  "date":"2010-07-23T09:19:38-07:00",
  "location":{
    "position":{
      "latitude":"45.445793867111",
      "longitude":"-122.64261245728",
      "speed":"0",
      "altitude":"0",
      "horizontal_accuracy":"24",
      "vertical_accuracy":"0"
    },
    "type":"point"
  },
  "raw":{
    "battery":"80"
  }
}

If you requested multiple locations, the response will be returned as an array:

HTTP/1.1 200 OK
 
{
  "locations":[
    {
      "uuid":"ffa3525c-1bbd-45aa-9870-bdbe49daf628",
      "date":"2011-10-30T16:50:05-07:00",
      "location":{
        "position":{
          "latitude":"45.425793867131",
          "longitude":"-122.66261245728",
          "speed":"0",
          "altitude":"0",
          "horizontal_accuracy":"24",
          "vertical_accuracy":"0"
        },
        "type":"point"
      },
      "raw":{
        "battery":"80"
      },
      "username":"geoloqi"
    },
    {
      "uuid":"ffa3555c-1bbd-45aa-9870-bdbe49daf678",
      "date":"2011-10-30T16:49:38-07:00",
      "location":{
        "position":{
          "latitude":"45.445793867111",
          "longitude":"-122.64261245728",
          "speed":"0",
          "altitude":"0",
          "horizontal_accuracy":"24",
          "vertical_accuracy":"0"
        },
        "type":"point"
      },
      "raw":{
        "battery":"80"
      },
      "username":"aaronpk"
    }
  ]
}

If you'd like the API to always return in an array format, even when only a single Geoloqi token is provided, prefix the query value with a comma (ex: share/last?geoloqi_token=,1111).

Errors

As long as one or more tokens are still valid, you will get a valid response.

If all of the tokens have expired, you will get the following response:

HTTP/1.1 403 Forbidden
 
{
  "error":"invalid_token",
  "error_description":"No tokens in the request are currently valid"
}