UserStore

Tokens

The token object contains data from a specific request with UserStore.js. In most cases, it will be a user object. For example, if a user signed in, it will return a token ID which only the app can look up to get the associated user object.

Get Token Data

Retrieves the data associated with the token returned when using UserStore.js.

Arguments

id
required
The token id returned from UserStore.js.
Definition
GET https://api.userstore.io/1/tokens/:ID
userstore.tokens.get(id, callback)
Example Request
curl https://api.userstore.io/1/tokens/fdd8ed77417641dda3a39fa4ce591417 \
   -u SECRET_KEY:
userstore.tokens.get(
  'fdd8ed77417641dda3a39fa4ce591417',
  function(err, token) {}
);
                  
Object Response
{
  "type": "signin",
  "data": {
    "id": "lFVofRqhZ",
    "email": "[email protected]",
    "username": "johnsmith",
    "first_name": "John",
    "last_name": "Smith",
    "is_active": true,
    "is_email_verified": true,
    "last_signin": "2014-08-04T23:48:34.288Z",
    "updated_at": "2014-08-04T23:46:19.106Z",
    "created_at": "2014-08-04T23:46:19.106Z"
  }
}