auth.checkToken [HTTP GET]
Retrieve a full token from Upcoming, from just the token code.
This method should also be called on saved tokens before proceeding to
access user data, in order to verify that the token has not expired and is valid.
See the
Token-based authentication page for details.
Arguments
api_key (Required)
Your API application key. If you don't have one,
create one.
token (Required)
The token code in question.
Example Response
XML
<?xml version="1.0" encoding="UTF-8"?>
<rsp stat="ok" version="1.0">
<token token="<40 Digit Token>" user_id="674" user_username="getluky" user_name="Gordon Luk"/>
</rsp>
JSON
{ "rsp" : { "stat" : "ok",
"token" : [ { "token" : "<40 Digit Token>",
"user_id" : 674,
"user_name" : "getluky",
"user_username" : "Gordon Luk"
} ],
"version" : 1
}
}
Error Codes (sent in HTTP Response Header)
404 Not Found:
- Token not found, is expired, or was invalid. - Please send the user back to the authorization page.