Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting HTTP 400 for /v2/account request with valid bearer authentication code #19

Closed
kjintar opened this issue Mar 21, 2015 · 7 comments
Labels

Comments

@kjintar
Copy link

kjintar commented Mar 21, 2015

Hey there,

I'm getting HTTP 400 status code when pulling data from /v2/account. Returning json says:

{"text":"ErrBadData"}

Tested with own application and the example node application.

Greetings,
Teranas

@kjintar
Copy link
Author

kjintar commented Mar 21, 2015

Interesting. Seems to be a bug related to my main account (Teranas.6150) ... Testing with World vs. World account (Amar.4162) works well.

@lye
Copy link
Contributor

lye commented Mar 21, 2015

Blergh, that's probably a bug in the parsing code for account/character blobs. Thanks for the heads up; will try to fix it next week.

@lye lye added the Bug label Mar 21, 2015
@vennekilde
Copy link

Same issue here, my account name is (I Am Dansker.7105) in case it helps locate the issue

@Eastborn
Copy link

I also Encountered something similar.

My account is Eastborn.6089.
The headers are:

Request URL
https://api.guildwars2.com/v2/account?access_token=5EC19845-F2B0-4CE3-BBC6-CEEB45D36471&callback=_hellojs_5e9umrjo

General
Remote Address:64.25.47.16:443
Request URL:https://api.guildwars2.com/v2/account?access_token=AD0C7E66-5544-4756-B6DF-9A8E05C7C11B&callback=_hellojs_bcrvai9
Request Method:GET
Status Code:400 Bad Request

Response Headers
view source
Access-Control-Allow-Origin:*
Content-Length:21
Content-Type:application/json; charset=utf-8
Date:Mon, 23 Mar 2015 13:06:11 GMT
Server:Microsoft-IIS/7.5
X-Content-Type-Options:nosniff

Request Headers
view source
Accept:/
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8,nl;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Cookie:ga=GA1.2.15426245.1425416427; s=7F2F3BB0-27F2-407E-8644-6219444E1E42; _utmt_UA-18978290-1=1; utma=159804514.15426245.1425416427.1427113213.1427115017.7; _utmb=159804514.16.10.1427115017; utmc=159804514; _utmz=159804514.1427115017.7.6.utmcsr=159.253.7.156|utmccn=(referral)|utmcmd=referral|utmcct=/GW2/
DNT:1
Host:api.guildwars2.com
Pragma:no-cache
Referer:http://159.253.7.156/GW2/
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36

Query String Parameters
view source
view URL encoded
access_token:AD0C7E66-5544-4756-B6DF-9A8E05C7C11B
callback:_hellojs_bcrvai9

@darthmaim
Copy link
Contributor

@Eastborn You have to send the access_token as Bearer Token in the Authorization header (Authorization: Bearer AD0C7E66-5544-4756-B6DF-9A8E05C7C11B) and not as query string parameter.

@vennekilde
Copy link

Did you by any chance just fix this? as it seems to work on my end now :P

@lye
Copy link
Contributor

lye commented Mar 24, 2015

Yeah, sorry for not updating, wasn't sure when the fix was gonna land.

Should be working now!

@lye lye closed this as completed Mar 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants