| This page documents the API.
This page is about the API for the game. It contains information such as contents, structure, & other miscellany. See Category:API for other pages on the API. |
This endpoint is deprecated and planned to potentially be removed by December 2023. It is recommended to switch to v3 of the API.
The bank API can be used to access information about an alliance's bank that you have permissions for.
Accessing the API[]
The Bank API can be accessed at the URL:
baseurl/alliance-bank/?allianceid=X&key=Y
The X should be the alliance ID you want to access. The Y should be your API key, it is a hexadecimal key which can be found at the bottom of your account page in-game.
Successfully inputting the above, you'll get the bank information returned as JSON. Otherwise:
If you input a valid API key but not an alliance that you have access to you'll get this:
{
"success":false,
"general_message":"Unable to access. You are not in this alliance."
}
If you input a false API key you'll get this as a response:
{
"success":false,
"general_message":"Invalid API key."
}
An example of a call to this API should look like this:
http://politicsandwar.com/api/alliance-bank/?allianceid=3940&key=a3bf9fdb8f39a1
Obviously, that's not an actual API key, just an example.