API talk:2/commerce/transactions

From Guild Wars 2 Wiki
Jump to navigationJump to search

In the "Response" section for the second-level endpoint it is stated that they would return "buy" and "sell" (singular) when in fact they are "buys" and "sells" (plural) like it was also used in the example. --Nithanim (talk) 22:27, 22 August 2015 (UTC)

Fixed, thanks for pointing it out. Eearslya (talk) 22:36, 22 August 2015 (UTC)
Thank you so much, once again :) --Nithanim (talk) 22:39, 22 August 2015 (UTC)

Authorization[edit]

can someone explain to me how to write this request? Its obviously not a working url...I have a key

https:// api.guildwars2.com/v2/commerce/transactions/history/sells
Authorization: Bearer api-key-here

The preceding unsigned comment was added by Reanne (talkcontribs).

Authorization: Bearer API-KEY is an HTTP header, not part of the URL. In order to provide the API key within the URL, use this format instead. https://api.guildwars2.com/v2/commerce/transactions/history/sells?access_token=API-KEY. Eearslya (talk) 03:37, 20 February 2016 (UTC)
You execute a normal GET-request basically but with an additional header field that is "Authorization: Bearer <api-key>". When you use a language/library that asks for a key/value-pair instead of the whole field, you need to specify "Authorization" as the key and "Bearer <api-key>" as value (like i did with my library). --Nithanim (talk) 00:45, 21 February 2016 (UTC)