User auth on the third-party site

I’m working on a web application about wow pvp and i want to implement some stuff that i cant figure out how to do.

The goal is to let a user log in on my site with battle.net, and than get his account’s characters data. So i want to find the best way to implement this, any advices?

Hello Velosaf,

You should be able to use the
/profile/wow/character/{realmSlug}/{characterName} api to get information you’re looking for about a specific character. Check out the World of Warcraft Profile APIs for more information.

You can even check out some of our example applications, such as the Java one, here, for how to extract faction information.

-Ralangee

Hi Velosaf,

You want to use the Authorization Code flow. What this will do is take the user out to battle net to sign in (and approve from Authenticator if enabled) and afterword it will redirect back to a URL you provide with a code you can use to get an access token. That access token can then be passed to normal api calls such as /wow/user/characters.

Worth noting there are official and community created libraries that already deal with the authentication process:

Language Authentication Library Official
PHP gitlab.com/davidmatthew/blizzard-api-php No
Ruby (Omniauth) github.com/Blizzard/omniauth-bnet Yes
Node (Passport) https://github.com/Blizzard/passport-bnet Yes

Any libraries for Vue/Django combination?

Unfortunately the only Django lib I know of was last updated 3 years ago, meaning it does not support the new dev portal endpoints.

However since this is a standard OAuth2 provider, you probably can use https://django-oauth-toolkit.readthedocs.io/en/latest/ for authentication.

As for consuming the endpoints they are simple http requests using the token you get from the OAuth2.