Neural.1824 Posted February 12, 2018 Share Posted February 12, 2018 I'm not exactly new to working with the API, but when it comes to using API Keys, I'm running into some basic issues.To access the data on a given account, you need an API key, that I get. I use GW2Efficiency, etc., but the wiki has the following listed (using dyes as an example):https://api.guildwars2.com/v2/account/dyesAuthorization: Bearer |API key|Could someone please tell me the following, just to help me clarify:1) is the line break just formatting? Or is the initial URL expecting a second input?2) is the word "Bearer" part of the URL, or is it actually supposed to be |Bearer| where you enter something like the account name?Or, if it's easier, just a sample un-broken URL (exact syntax) would work too. I just need a starting point. As mentioned, I understand the API key itself, so putting |API Key| at the end of the URL is fine.Thanks.(edit: had to use pipes instead of greater-than/less-than cause the forum tries to read it as an html tag) Link to comment Share on other sites More sharing options...
Archomeda.6472 Posted February 12, 2018 Share Posted February 12, 2018 Authorization is an HTTP header. It's part of the HTTP request and not of the URL.Or, alternatively, you can also append the key as a URL parameter, like https://api.guildwars2.com/v2/account/dyes?access_token=<key> Link to comment Share on other sites More sharing options...
Neural.1824 Posted February 13, 2018 Author Share Posted February 13, 2018 Thank you ! :) Link to comment Share on other sites More sharing options...
Neural.1824 Posted February 13, 2018 Author Share Posted February 13, 2018 Ok. one more question. How do I know which dye is associated with which dye name?I'm more used to an item having the ##### format (like 19702).I realize the numeric system is a way of saving data transfer etc., so it makes sense over using 5 digit ID's.I'll look on the wiki to see if there's a resource for it, but if there isn't, a link would be appreciated :) Link to comment Share on other sites More sharing options...
Archomeda.6472 Posted February 13, 2018 Share Posted February 13, 2018 https://api.guildwars2.com/v2/colors is the endpoint you're looking for. Wiki Link to comment Share on other sites More sharing options...
Neural.1824 Posted February 13, 2018 Author Share Posted February 13, 2018 Ok, that makes sense. Account unlock vs. global info. Thanks again. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.