API:2/tokeninfo
From Guild Wars 2 Wiki
< API:2
Jump to navigationJump to search
/v2/tokeninfo
- HTTP method
- GET
- Format
- json
- API version
- version 2
- Release date
- 2015-06-09
- Scope
- account
- Optional
- none
This resource returns information about the supplied API key.
Parameters
access_token- (optional) If the API key is not specified in the request header, it can be specified here.v- (optional) Specify the schema version to use for the response data.
Response
id(string) - The first half of the API key that was requested.name(string) - The name given to the API key by the account owner. Warning: The value of this field is not escaped and may contain valid HTML, JavaScript, other code. Handle with care.permissions(array) - Array of strings describing which permissions the API key has. The array can contain any of:account- Grants access to the/v2/accountendpoint (This permission is required for all API keys).builds- Grants access to view each character's equipped specializations and gear.characters- Grants access to the/v2/charactersendpoint.guilds- Grants access to guild info under the/v2/guild/:id/sub-endpoints.inventories- Grants access to inventories in the/v2/characters,/v2/account/bank, and/v2/account/materialsendpoints.progression- Grants access to achievements, dungeon unlock status, mastery point assignments, and general PvE progress.pvp- Grants access to the/v2/pvpsub-endpoints. (i.e./v2/pvp/games,/v2/pvp/stats)tradingpost- Grants access to the/v2/commerce/transactionsendpoint.unlocks- Grants access to the/v2/account/skinsand/v2/account/dyesendpoints.wallet- Grants access to the/v2/account/walletendpoint.
Additional fields as of schema 2019-05-22T00:00:00.000Z and later:
type(string) - The type of the access token given. EitherAPIKeyorSubtoken.expires_at(string, optional) - If a subtoken is given, ISO8601 timestamp indicating when the given subtoken expires.issued_at(string, optional) - If a subtoken is given, ISO8601 timestamp indicating when the given subtoken was created.urls(array, optional) - If the given subtoken is restricted to a list of URLs, contains an array of strings describing what endpoints are available to this token.
Example
Request
https://api.guildwars2.com/v2/tokeninfo Authorization: Bearer <access token>
Response
{
"id": "ABCDE02B-8888-FEBA-1234-DE98765C7DEF",
"name": "My API Key",
"permissions": [
"account",
"characters",
"tradingpost",
"unlocks",
"build"
]
}