Get API Token API: Difference between revisions

From War.app Wiki
Jump to navigation Jump to search
Created page with " The '''GetAPIToken API''' is used to retrieve the API token for your account. The API token is required to call any of the other WarLight APIs. The easiest way to get your ..."
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:


The '''GetAPIToken API''' is used to retrieve the API token for your account.  The API token is required to call any of the other WarLight APIs.
The '''GetAPIToken API''' is used to retrieve the API token for your account.  The API token is required to call any of the other War.app APIs.


The easiest way to get your API token is to simply access http://warlight.net/API/GetAPIToken.aspx in your browser while signed into WarLight.  From here, copy the API token out of the returned JSON and use it in your application for other API requests.   
The easiest way to get your API token is to simply access https://www.war.app/API/GetAPIToken in your browser while signed into War.app.  From here, copy the API token out of the returned JSON and use it in your application for other API requests.   


The API token won't ever expire automatically.  The only thing that stops an API token from working is if you change your WarLight account password.  This will re-randomize your token.  If you change your password, you should call GetAPIToken again to get the new one.
The API token won't ever expire automatically.  The only thing that stops an API token from working is if you change your War.app account password.  This will re-randomize your token.  If you change your password, you should call GetAPIToken again to get the new one.


Every WarLight account has a unique API token.  You should not reveal this token to other players - treat it as you would treat your password.  If you ever suspect someone has learned your token, you should immediately change your WarLight account password to invalidate the token.
Every War.app account has a unique API token.  You should not reveal this token to other players - treat it as you would treat your password.  If you ever suspect someone has learned your token, you should immediately change your War.app account password to invalidate the token.


If you want to get your API Token programmatically using your password, you can POST your e-mail address and password to this page in the format  Email=your@email.com&Password=yourpassword
If you want to get your API Token programmatically using your password, you can POST your e-mail address and password to this page in the format  Email=your@email.com&Password=yourpassword
[[Category:API]]

Latest revision as of 02:35, 18 April 2026

The GetAPIToken API is used to retrieve the API token for your account. The API token is required to call any of the other War.app APIs.

The easiest way to get your API token is to simply access https://www.war.app/API/GetAPIToken in your browser while signed into War.app. From here, copy the API token out of the returned JSON and use it in your application for other API requests.

The API token won't ever expire automatically. The only thing that stops an API token from working is if you change your War.app account password. This will re-randomize your token. If you change your password, you should call GetAPIToken again to get the new one.

Every War.app account has a unique API token. You should not reveal this token to other players - treat it as you would treat your password. If you ever suspect someone has learned your token, you should immediately change your War.app account password to invalidate the token.

If you want to get your API Token programmatically using your password, you can POST your e-mail address and password to this page in the format Email=your@email.com&Password=yourpassword