Fetch token
From ePrize Developers Wiki
(Difference between revisions)
Line 2: | Line 2: | ||
|crumbs=[[API Home Page]] :: [[Games and Awards]] | |crumbs=[[API Home Page]] :: [[Games and Awards]] | ||
|summary=TODO: Fill me in. | |summary=TODO: Fill me in. | ||
+ | |||
+ | |resource=/v1/{apikey}/game/{game}/token/{token} | ||
+ | |methods=GET | ||
+ | |resourceargs='''apikey''': Your [[API Key]]. | ||
+ | |||
+ | '''gameId''': Game Identifier for the Sweepstakes into which the entry will be awarded. (A constant value provided to you by ePrize) | ||
+ | |||
+ | '''token''': Token ID retrieved from response from [[Award_token|awarding a token]] | ||
+ | |paramsrequired=None | ||
}} | }} | ||
Revision as of 18:55, 6 April 2011
API Home Page :: Games and Awards
Summary
TODO: Fill me in.
Resource
/v1/{apikey}/game/{game}/token/{token}
Valid Methods
GET
Resource Arguments
Note: resource arguments are always required.
apikey: Your API Key.
gameId: Game Identifier for the Sweepstakes into which the entry will be awarded. (A constant value provided to you by ePrize)
token: Token ID retrieved from response from awarding a token
Parameters Required
None
Example: Requesting A Valid Token
Summary
This demonstrates a good request for a token that exists.
Response
HTTP Status Code: 200 OK
<?xml version="1.0" encoding="UTF-8" ?> <result ver="1.0"> <token> <id>1</id> <user>Bill</user> <game>12345-1234-1234-1234</game> </token> </result>
Example: Requesting An Invalid Token
Summary
This demonstrates a good request for a token that does not exist.
Response
HTTP Status Code: 404 Not Found
<?xml version="1.0" encoding="UTF-8"?> <result ver="1.0"> <status>0</status> </result>