Editing Validate invite token API

Jump to: navigation, search

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
If you're creating a system that invites players to Warzone games via the [[Create game API]], you may wish to validate whether or not an invite token or e-mail address is valid before you attempt to invite them to a game.
+
If you're creating a system that invites players to WarLight games via the [[Create game API]], you may wish to validate whether or not an invite token or e-mail address is valid before you attempt to invite them to a game.
  
 
Of course, if you invite a player to a game with their token, the [[Create game API]] will inform you that it's invalid.  But you may wish to determine whether or not it's valid before attempting to create a game, such as when a new player signs up on your site.   
 
Of course, if you invite a player to a game with their token, the [[Create game API]] will inform you that it's invalid.  But you may wish to determine whether or not it's valid before attempting to create a game, such as when a new player signs up on your site.   
  
You can do this by calling the following API: https://www.warzone.com/API/ValidateInviteToken?Token=12345678
+
You can do this by calling the following API: https://www.warlight.net/API/ValidateInviteToken?Token=12345678
  
 
To call this programmatically, you can POST your e-mail address and API token to this page in the format Email=your@email.com&APIToken=yourapitoken  You can get your API token from the [[Get API Token API]].
 
To call this programmatically, you can POST your e-mail address and API token to this page in the format Email=your@email.com&APIToken=yourapitoken  You can get your API token from the [[Get API Token API]].
Line 9: Line 9:
 
This will return the following fields about the player whose token you provided:
 
This will return the following fields about the player whose token you provided:
  
* tokenIsValid:  This simply tells you that the token does belong to a Warzone player.
+
* tokenIsValid:  This simply tells you that the token does belong to a WarLight player.
* name: The player's Warzone nickname.
+
* name: The player's WarLight nickname.
* isMember: True if the player has purchased a Warzone membership.
+
* isMember: True if the player has purchased a WarLight membership.
 
* level: Their current level.
 
* level: Their current level.
* color: The player's preferred Warzone color.
+
* color: The player's preferred WarLight color.
 
* tagLine: The tagline the player has set up to display on their profile page.
 
* tagLine: The tagline the player has set up to display on their profile page.
 
* clotpass: See [[CLOT Authentication]]
 
* clotpass: See [[CLOT Authentication]]
Line 30: Line 30:
 
To use this, provide a parameter named TemplateIDs (either via the query string or POST param) which contains a comma-delimited list of template IDs.  You may pass up to 20 template IDs per call.
 
To use this, provide a parameter named TemplateIDs (either via the query string or POST param) which contains a comma-delimited list of template IDs.  You may pass up to 20 template IDs per call.
  
An example request would look like https://www.warzone.com/API/ValidateInviteToken?Token=12345678&TemplateIDs=342040,342041,342042,342043
+
An example request would look like https://www.warlight.net/API/ValidateInviteToken?Token=12345678&TemplateIDs=342040,342041,342042,342043
  
 
The API will return results for each template ID provided in the returned JSON.  Each template will return a "result" node that contains the string "CanUseTemplate", "CannotUseTemplate", or another string if an error occurred.  If "CannotUseTemplate" is returned, there will be an additional node named "reasonCode" that explains why the player was unable to use the template.
 
The API will return results for each template ID provided in the returned JSON.  Each template will return a "result" node that contains the string "CanUseTemplate", "CannotUseTemplate", or another string if an error occurred.  If "CannotUseTemplate" is returned, there will be an additional node named "reasonCode" that explains why the player was unable to use the template.

Please note that all contributions to Warzone Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Warzone Wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox