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

GetRealmsIndexAsync() failing for TW #211

Closed
bonesoul opened this issue Mar 21, 2023 · 5 comments · Fixed by #212
Closed

GetRealmsIndexAsync() failing for TW #211

bonesoul opened this issue Mar 21, 2023 · 5 comments · Fixed by #212

Comments

@bonesoul
Copy link
Contributor

bonesoul commented Mar 21, 2023

basically I do have an client & secret for us endpoints.

using these api client id and secret values i can make calls to all realms except tw:

var result = await client.GetRealmsIndexAsync(@namespace);

16:39:22 [INF] [RealmUpdater] querying realms of taiwan failed with System.Net.Http.HttpRequestException: Response code 401 (Unauthorized) does not indicate success. Request: https://tw.api.blizzard.com/data/wow/realm/index?namespace=dynamic-tw&locale=zh_TW
   at ArgentPonyWarcraftClient.WarcraftClient.GetAsync[T](String requestUri, String accessToken)
   at ArgentPonyWarcraftClient.WarcraftClient.GetAsync[T](String requestUri)
   at ArgentPonyWarcraftClient.WarcraftClient.GetRealmsIndexAsync(String namespace, Region region, Locale locale)
   at ArgentPonyWarcraftClient.WarcraftClient.GetRealmsIndexAsync(String namespace)
   at Wowtrack.Data.Updater.Jobs.Realm.RealmUpdater.GetRealmsForRegion(Region region, Locale locale) in C:\Coding\wowtrack.gg\core_dotnet\src\tools\updater\Jobs\Realm\RealmUpdater.cs:line 106..

tw version fails:

https://tw.api.blizzard.com/data/wow/realm/index?namespace=dynamic-tw&locale=zh_TW&access_token=TOKEN

@bonesoul
Copy link
Contributor Author

bonesoul commented Mar 21, 2023

I have further debugged the issue, the library can't get an access token for tw:

image

yet again caused by:

image

@bonesoul
Copy link
Contributor Author

bonesoul commented Mar 21, 2023

seems the issue caused by because that endpoints changed:

https://develop.battle.net/documentation/guides/using-oauth

US, EU, APAC | https://oauth.battle.net/authorize | https://oauth.battle.net/token

once if fix the host as https://apac.battle.net it just works.

@bonesoul
Copy link
Contributor Author

bonesoul commented Mar 21, 2023

created a pr for this: #212

@bonesoul
Copy link
Contributor Author

bonesoul commented Apr 5, 2023

doc now suggests https://develop.battle.net/documentation/guides/using-oauth for EU, US and APAC regions.

@bonesoul
Copy link
Contributor Author

bonesoul commented Apr 6, 2023

updated the PR for according to latest oauth host changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant