API Discussion

Apr 20 Auto refreshing access code in google sheets I recently used my (limited, as in, 1 class) of knowledge to scrape together some code snippets that i found online to create a spreadsheet for my guild using the wow API to display things like class, ilvl, and neck level. I was super proud until it broke in 24 hrs due to hard coding in the access code like this. https://i.imgur.com/rBqIdrr.png Is there a simple way to create a new access code using google script so I don't have to manually get a new access code every 24 hours? I ended up uiNight4 Apr 20
Apr 20 Character Profile API - individual character achievements? Hello, I'm playing with the APIs for an Android app and I noticed that all my characters have the same amount of achievement points. I initially thought that it was an API bug but then realised that all achievements are shared between characters on the same account. Is there any way to find which character completed a certain achievement?DanTheMan2 Apr 20
Apr 18 US Auction House Static Files 404 Greetings adventurers, We are currently aware of and investigating an issue with the serving of Auction House Static File "Dumps" for US realms. This issue results in a 404 Resource Not Found error when attempting to resolve the static file URL provided via the Auction API - Auction Data Status request. Thank you for your patience while we continue our investigation.Maguthul4 Apr 18
Apr 18 Auction API - requesting snapshot (auctions.json) file returns 404 After making a (successful) request for the latest realm auction house data I'm attempting to download the snapshot file from the URL returned. In every case I'm getting a 404 error. This happens on multiple realms. The URL returned by the Auction API is in the form of: http://auction-api-us.worldofwarcraft.com/auction-data/xxxxxxxxxx/auctions.json I have tried setting the Authorization header to my access token to see if that helped, but it does not. It's been a while since I have grabbed AH data, but once I had the URL it used to be as simple as downloading and parsing the file. I'm assuming something has changed in how this works, but after trying a number of things I'm out of ideas. What should I be doing once I have the file URL?Geekenstein3 Apr 18
Apr 16 Honor Talents in any API call in active development after 2.5 years of an open request? The only way I know how to get it is by checking a person's armory page. It'd be nice to have this data shoved into the existing talents call. https://us.battle.net/forums/en/bnet/topic/20749215465#post-1 https://us.battle.net/forums/en/bnet/topic/20752397183#post-1Veliace0 Apr 16
Apr 15 Get Mythic Affixes ? Hi ! In order to improve my Discord bot, I want to retrieve the list of weekly affixes, but I can't find to way to do that by reading and searching in the API (only found indexes and description of each affix but not the actuel set of affix). I found https://github.com/WFrancois/wow-affixes/blob/master/src/Service/WowWeek.php but I'm not sure how it works (weirds ID and time calculating). Can you please indicate how to do this ? Thanks ! Sorry for the language mistakes, I'm not comfortable with englishAlistanor0 Apr 15
Apr 15 Complete Character Lists? Is it possible to actually get a complete character name list from a server without iteratively checking names of every combination? First time considering writing something with this api, but I have a big project in mind. ThanksBloodvenom5 Apr 15
Apr 11 Hearthstone Stats/Match Data Hello to all Blizzard Forums users and the developers! I am fairly certain that this question was asked ALOT of times before, most likely under different formulations, but the point is pretty much the same - Does it make sense to wait for some kind of an update or anything that will allow players to see their previous Hearthstone data (match history, match outcomes, opponent usernames and their classes, e.t.c)? Like many other players, i never got around to using third-party software in order to retain my match history, but i nonetheless would like to see any possible information if of-course Blizzard Entertainment keeps it in their database. On this basis, a really important (in my opinion at-least) question arises: If let's say sometime in the future (whenever) Blizzard does release a program or anything that will allow us to see the match outcomes, will it be possible to see match outcomes from the past (like 4, 5 years ago, games that took place way back in 2014, 2015 and 2016 for an example) or will this feature include only newer matches? Hopefully, we do get a clear answer, i had some wonderful time grinding during the two previous seasons and would really like to see some match outcomes that i unfortunately have little memory of. I wrote on the Hearthstone forums, tried contacting the devs on Twitter, and have pretty much done all i could but there's almost no information regarding this question. Thank you in advance for any answers, yours sincerely, GeneEvgeni1 Apr 11
Apr 8 Using an asset from the official WoW website Hello! So, while I was developing the website, I began to look at the official WoW website for inspiration. I noticed that Azerite gear has an azerite border around them to better diffirentiate from normal gear. This one: https://worldofwarcraft.akamaized.net/static/components/GameIcon/GameIcon-azerite.png I downloaded it and began to fiddle a little bit with it until I began wondering about the legallity of downloading assets from any Blizzard website and using on any kind of software. So my question is, can I get into legal trouble for it?Extremus1 Apr 8
Apr 6 Need help with Overwatch API for school project (sorry I'm a noob) So for my high school mobile app dev. final I want to make an app which includes a stat tracker for players as a part of it. I know/think I need this line of code to access the player's information https://<region>.api.battle.net/profile/<user_id>/<game>/document/path?access_token=<token> but I'm not sure how to get permission for an access token or how to retrieve it after I'm not really sure how to create a client properly because I am unsure of what to include in the redirect URI section too I tried looking at multiple guides but I didn't understand what some of it meant so it would be great if someone could explain to me how to do it because I am probably missing steps and I don't know how to do it. Thanks to anyone who tries to help I know I probably look stupid hahaPrisonMike1 Apr 6
Apr 6 Bug or not? If I try to get character profile with API (Character Profile), I will get this reply: { "lastModified": 1553883787000, "name": "Сухиешортики", "realm": "Свежеватель Душ", "battlegroup": "Vindication", "class": 10, "race": 26, "gender": 1, "level": 120, "achievementPoints": 7640, "thumbnail": "soulflayer/168/170062760-avatar.jpg", "calcClass": "f", "faction": 1, "totalHonorableKills": 11 } It is monk pandaren (RaceID in reply - 26). But if I want to get race id by calling getRaces with RaceID = 26, I will get 404 Not Found. As I found out, pandaren RaceID= 24. It is a bug or not?Wishpering1 Apr 6
Apr 5 StarCraft Remastered API? Does anybody know if Starcraft remastered will have an API for pulling game data? Or has this information now been released yet?Serenity9 Apr 5
Apr 4 Hearthstone player profiles Dear API developers, As this game is 1.5 years old now, isn't it the time to open possibility to create some nice community websites with player profiles data, like seasonal rankings?Kernel46 Apr 4
Apr 4 Are there plans to change Diablo III API in 2.6.5? Will there be changes to the Diablo III API in Patch 2.6.5 or the next cycle? A developer is currently working on a project, and wishes to know. Slated to finish by mid-May.Blizzplanet0 Apr 4
Apr 3 How To Delete An Api Client How To Delete An Api Client From https://develop.battle.net/access神林1 Apr 3
Apr 3 401 Bad client credentials Hi everyone, I'm not entirely sure that's the correct section for that, however i'm trying to connect my Bnet account with websites such as "https://thetrackernetwork.com/" and "https://masteroverwatch.com" to follow-up with my stats and have a clear leaderboards of what's going on with my OW gameplay. But every time I try to link my bnet to one of the websites mentioned before, i'm getting the 401 Bad Client Credentials error. So far i tried to: Log-out / Log-In from the bnet and attempt to link on each of the websites. Attempt to link the bnet with more then one website to isolate the issue. Might that be related to the region? Something like "i'm an EU player trying to link my bnet to a website that's trying to call an US bnet?" not sure if that makes any sense though.Guccigold2 Apr 3
Apr 3 Not working Mythic Keystone Character Profile API Trying to get M+ profile for my character (eu, Soulflayer), but I'm always getting 404 error code. Command - curl -H "Authorization: Bearer ******************" https://eu.api.blizzard.com/profile/wow/character/soulflayer/Сухиеносочки/mythic-keystone-profile?namespace=profile-eu\&locale=ru_RU Reply - {"code":404,"type":"BLZWEBAPI00000404","detail":"Not Found"} Python code: headers = {'content-type': 'application/json', 'Accept-Charset': 'UTF-8'} mplus = requests.get('https://eu.api.blizzard.com/profile/wow/soulflayer/Сухиеносочки/mythic-keystone-profile?namespace=profile-eu&locale=ru_RU&access_token=' + token, headers = headers) Reply - <Response [404]>Wishpering3 Apr 3
Apr 2 How often Auction Api is updating? Hi, i'm trying to do app which is using WOW Auction API, i can't find answer how often this API http://auction-api-eu.worldofwarcraft.com/auction-data/***** is updating? And is it a full list of auction?lnezzardl5 Apr 2
Mar 28 SC2 Data Ladder API Invalid mmr rating https://us.api.battle.net/data/sc2/ladder/199762?locale=en_US The first player that is returned with that ladder has a rating of '4294929921' this is a bronze ladder and of course thats not really a valid mmr rating :) { "id": 8920600679555268608, "rating": 4294929921, "wins": 20, "losses": 1, "ties": 0, "points": 416, "longest_win_streak": 11, "current_win_streak": 11, "current_rank": 1, "highest_rank": 100, "previous_rank": 0, "join_time_stamp": 1477950725, "last_played_time_stamp": 1478013537, "member": [ { "legacy_link": { "id": 5847443, "realm": 1, "name": "Eggster#110", "path": "/profile/5847443/1/Eggster" }, "played_race_count": [ { "race": "Protoss", "count": 21 } ], "character_link": { "id": 5847443, "battle_tag": "Eggster#1421", "key": { "href": "https://us.api.battle.net/data/sc2/character/Eggster-1421/5847443?namespace=prod" } } } ] } breath2015 Mar 28
Mar 25 News Scraping Hello! I wish Blizzard aired their news RSS feed again so I can gain news items like that, however it seems they do not want to do that since the launch of Legion. Is there any reliable way to gain news out there and is it confirmed to be allowed? Im pretty sure that sites like wowhead/mmochampion do not manually look up the bluetrackers etc, so how do they do it? I would like to check the latest news on a regular basis, scraping or not. But ofcourse I rather not scrape.Grumpymuppet0 Mar 25
Mar 25 Slow US api call Hello fellow developers! I am making a website that uses the AH api. At the moment, I can completely call/loop and insert a complete realm into my database within 10 seconds (about 150.000 rows). However, when I try to do this on any US realm, the call to get the AH data takes about 1 minute (50-70 seconds). Can you guys please help me :) If I have to import all US realms with a 60 second call the server is not gonna like it. Am I missing something? /love GrumpymuppetGrumpymuppet4 Mar 25
Mar 24 Blizzard Oauth - US, EU, CN Thanks to a developer, I was able to add my Blizzard Oauth key to a forum. However, I am curious. It works on USA. Will visitors be able to link to their EU or CN characters/server, or do I need to create a Blizzard Oauth key for EU, and for CN? If so, what is the link where I can create a Battle.net account to then create a API key? I always get redirected to the US. So don't know what the URL is.Blizzplanet1 Mar 24
Mar 24 Honor Talent API Call? Is there a way to gather a specific WoW character's honor talents through the API? I can't seem to find it.Goatbot8 Mar 24
Mar 19 OAuth 2 Documentation Updates Greetings Developers! There have been numerous community requests for more clarification in our guides regarding the new OAuth flow, and we're happy to share that we've updated our OAuth Client Credentials Flow documentation with some examples. We hope the community as a whole finds these examples to be helpful, especially new developers. We encourage all members of the community to share more examples and learn and grow together! If you wish to contribute examples, please go here!Ralangee0 Mar 19
Mar 19 Documentation for OWL api? I ran across this the other day, api.overwatchleague.com. Is this something we have documentation for? I'm able to figure out a few endpoints on my own.oneHP21 Mar 19
Mar 19 Canno't get the generate token c# Hi, I would like play with the blizzard API but I cannot connect to the API. I'm trying to make an iOS application in c# (Xamarin.iOS), i don't know what is the problem. I use OpenID.AppAuth nuget which is a port of AppAuth. The login works, I think, because I receive a mail from blizzard "You have granted [...] access to some of your Blizzard Account information." But I'm not able to get the token. I explain what I made: In my iOS app, tap on button launch `AuthWithAutoCodeExchange` method. I set my redirect URI => http://localhost:5000/api/values/ I made a web service in C# which just redirect to my url scheme : -> return Redirect("myurlscheme://"); But the callback is not catch by the AppDelegate of my app. I do not go into the `public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)` method. The `public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)` method is here. I don't know what I'm doing wrong. Thank you in advance, HawksylverHawkSylver0 Mar 19
Mar 17 WoW call for rolecheck status I'm trying to find a way to see if all the other party members have already selected a role (or roles) and also clicked the Accept button in a Join as Group dialog when I'm the party leader. Anyone know if there's a function call to return the current party's rolecheck / applied status? Thanks!FuryusSvětlo0 Mar 17
Mar 17 WoW mythic+ keystone profile - missing run.members data ... Response to this request returns run[n].members.length=0 for specific runs. I believe it's always the same runs which contains no data for run.members. Not sure if this a bug or expected behaviour for specific runs or mb technical feature. Just reporting :) upd. Not sure, but seems like this problem exists only on eu.api region. I checked out us.api and it seems ok.Gittax0 Mar 17
Mar 16 WoW Battleground Stats (eu) For a simple stats overview I am collecting the battleground data of (atm) approx. 1.2mio players from german and english (eu) realms. I noticed 2 Problems: Problem 1: Seething Shore. The Data for Seething Shore is completely off and completely impossible. I have over 77k players in my Database that have more victories than matches played. Here a few examples: https://worldofwarcraft.com/en-gb/character/eu/blackrock/d%C3%AAxzx/pvp https://worldofwarcraft.com/en-gb/character/eu/burning-blade/feonni/pvp https://worldofwarcraft.com/en-gb/character/eu/laughing-skull/fightmypala/pvp Some have more than 1000% winrate in Seething Shore. I first noticed this phenomenon with Eye of the Storm, (more on that in Problem 2) so I thought, okay, this is an old BG, maybe there was a bug and since they did not want to reset the data the data is now off for some players. But Seething Shore is the brand new BFA BG.... Problem 2: Eye of the Storm Okay, so, as I said before, Eye of the Storm has the same Problem as Seething Shore. Over 50k players from my sample have more Eye of the Storm victories than matches played. (if you want examples for that, you have to do api calls for the statistics of those players. For example: Inzzy - Tarren Mill, Ariana - Executus, nerastos - Lightning's blade) When I tried to look those players up on the WoW Website, (like I did for Seething Shore) I noticed that the Eye of the Storm stats don't look off on the Website. But then I noticed something else.. Problem 2.5: Eye of the Storm Website Data As I mentioned, I noticed the Eye of the Storm Stat Problem before I noticed that there is a Problem with Seething Shore as well. So I attempted to calculate the actual Eye of the Storm stats by adding together the stats for all other BGs and subtracting those from the "Total BG" value (Which is actually now pointless, because the Seething Shore Data is also wrong..). I noticed that the Eye of the Storm Data I calculated is an _EXACT MATCH_ with the Eye of the Storm Data on the World of Warcraft Website. That should be impossible. To me that means, that someone working on the Website probably noticed that the Eye of the Storm Data is wrong and actually calculates the Data for Eye of the Storm the same way I do. Which means that the Eye of the Storm Data on the Website is not the actual data but only what remains when you subtract all other BG data from the BG Total value.... Sorry that my explanation is hard to follow. If you do the Api calls on the players I mentioned you can see this for yourself... It's an extremely frustrating issue ... Thanks for reading!Wamtwo0 Mar 16
Mar 15 OAuth Error - Invalid callback URL 400 Hey folks, So I've been working on a node.js web app for a few days and everything has worked as intended when running my server on localhost. I'm able to login to my battlenet account using OAuth and everything. I then hosted my app to heroku and added a new redirect URI, while keeping the localhost URI as well. However, whenever I try to login to battlenet through my heroku hosted app, I get an OAuth error saying my callback URL is incorrect. It's not incorrect. I've checked it multiple times, the URL is exactly what it needs to be. The dev portal says that it can take up to 10min for changes to take affect, but at this point it's been about 16 hours and it still doesn't work. Thoughts?Ulthric1 Mar 15
Mar 14 What is the policy on branding the login button? Hello, I noticed in the license for the product, it is said that applications should not claim to have association with blizzard (understandable). I made an OAuth library, and I was wondering if it is okay to use battlenet assets and branding? Sort of like using that little bird for "log in with twitter", using the battlenet symbol and a blue gradient for "log in with battlenet" I could understand if bnet would be against this, just thought I'd ask.Crowz11 Mar 14
Mar 14 Plugins for Battle.net launcher? Hi. I was wondering if there is a way to create plugins for the battle.net launcher, for customization and such. I'm looking to implement a "time remaining: xx min xx sec" to the launcher as I feel like it's missing and would help me with the headache of having to calculate how long my downloads will take every single time. But I would also be very interested in customizing how the launcher looks in theme and such. I hope you guys can help me! :) Br, MymaqnMymaqn0 Mar 14
Mar 14 D3 API-how to get all heroes? I found that “/d3/profile/{account}/”only return recently active heroes. Is there any way to get the id of all heroes in the account?Squall2 Mar 14
Mar 14 Mythic Leaderboard Missing Profile Names Character Names are missing from certain Mythic Leaderboards currently https://us.api.blizzard.com/data/wow/connected-realm/11/mythic-leaderboard/353/period/685?namespace=dynamic-us&locale=en_US US Region all maps and realms that I have tried for periodid 685 onlyMAJ1 Mar 14
Mar 12 API doesn't get all character titles for World of Warcraft While calling the character endpoint with fields "titles" not all titles are returned by API. Sometimes there is over 40+ titles, but some characters seems to have only 1 or 2 attached, while in-game they have several dozen of achievements. Have anyone seen this behaviour?Dlugi1 Mar 12
Mar 12 Guild Progress Hello, Is there any new API for guild progress in the new API or should we continue fetching character data and analyzing it? Thanks...Nhea3 Mar 12
Mar 12 API coder wanted (Diablo III) Update: March 21 -- thanks. Found a coder. ...Blizzplanet0 Mar 12
Mar 11 KR Region Auction House API broken The KR region AH APIs have been broken for about 4 days now. > GET /wow/auction/data/garona?namespace=dynamic-kr&locale=en_US&access_token=USxxxxxxxxxxxxxx HTTP/1.1 > Host: kr.api.blizzard.com > User-Agent: curl/7.58.0 > Accept: */* > < HTTP/1.1 500 Internal Server Error < Date: Mon, 11 Mar 2019 13:49:27 GMT < Server: Apache-Coyote/1.1 < content-type: text/plain;charset=utf-8 < content-length: 16 < x-trace-traceid: 1584ec70-8b28-a1e0-bdd3-fa167ac307ec < x-trace-spanid: 1584ec70-8b28-a320-bdd3-fa167ac307ec < x-trace-parentspanid: 1584ec70-8b28-a2f0-bdd3-fa167ac307ec < x-frame-options: SAMEORIGIN < X-Content-Type-Options: nosniff < connection: keep-alive < Downstream Error See https://does.theapi.work/ for latest status.erorus1 Mar 11
Mar 9 Node.js/express 400 error Hello! I am trying to figure out how to build a basic node.js/express backend for oauth. I have never used express before so this is new to me. I am following the node.js/express bnet strategy https://www.npmjs.com/package/passport-bnet and I am also following this guide by Uglyer https://us.battle.net/forums/en/bnet/topic/20767577109?page=1#post-4 When I run my server (assuming I have it even set up correctly) and try to hit localhost:8000/auth/bnet I get a 400 error 'The redirect_uri parameter must be a valid URI' and a URL of https://us.battle.net/oauth/authorize?response_type=code&client_id=29a27f8c46ba464fb3826384e7ed6d7c Here is my server.js file require('dotenv').config(); process.env.NODE_ENV= "development"; const express = require('express'); const passport = require('passport'); const constants = require('constants'); const BnetStrategy = require('passport-bnet').Strategy; const app = express(); const port = process.env.PORT || 8000; app.listen(port, () => { console.log('Server started!'); }); // ROUTES //instance of router const router = express.Router(); router.use((req, res, next) => { console.log(req.method, req.url); next(); }); // home page router.get('/', (req, res) => { res.send('I am the home page'); }); /*========================= // Bnet OAuth2 Navigate to // ===========================*/ // Authenticate Requests router.get('/auth/bnet', (req, res, next) => { passport.authenticate('bnet', (err, user, info) => { if (err) { return next(err) } })(req, res, next); }); //*============================ // Bnet OAuth2 Callback Route // ==============================* router.get('/auth/bnet/callback', (req, res, next) => { passport.authenticate('bnet', { failureRedirect: constants.DOMAIN + '/loginFailure' }, (err, user, info) => { if (err) { return next(err); } console.log(user); res.redirect(constants.DOMAIN + '/loginSuccess' ); })(req, res, next); }); // handle CORS const cors = require('cors'); // apply routes to app app.use('/', router, cors()); // Use the BnetStrategy within Passport. passport.use(new BnetStrategy({ grant_type: 'authorization_code', clientID: process.env.BNET_ID, clientSecret: process.env.BNET_SECRET, callbackURL: constants.CALLBACKURL, region: 'us' }, (accessToken, refreshToken, profile, done) => { // Profile returns the Bnet Id, Battletag return done(null, profile); })); Here is my .env file BNET_ID='myID' BNET_SECRET='mySecret' Here is my constants file let constants = {}; if (process.env.NODE_ENV === 'production') { constants.DOMAIN = ''; constants.CALLBACKURL = 'https://localhost:8000/auth/bnet/callback' } else { constants.DOMAIN = 'https://localhost:' + 4200; constants.CALLBACKURL = 'https://myBackendApp.localtunnel.me/auth/bnet/callback' } module.exports = constants; As I said I am new to to express. I'm sure I could move some of this stuff to separate files and clean up some areas, but at the moment I just want to make sure things are in order, as I'm aware code order matters greatly in express, and if I've set up things in a way that should be working as I intend. On my front end I have a button with the tag <a href="https://myBackendApp.localtunnel.me/auth/bnet/"> that returns a 404 but that is another issue I can solve later. I just want to figure out the node.js/express stuff. Thanks for taking the time to read this!Isadore0 Mar 9
Mar 8 Nodejs Express OAuth2 Guide OAuth2 can be kind of confusing at times, especially in the development environment. Please, allow me to try to alleviate some of your frustration setting up and testing Bnet OAuth2 in your app. This guide is mainly going to focus on how to get a development environment running. As a result, the production side will come to life as well. I used this guide by Billi to get all set up myself. https://us.battle.net/forums/en/bnet/topic/14881218054 I am only going to cover bnet-us, please refer to Billi's guide to have more than just the US region. A little disclaimer is that I don't claim for this to be the best method but it is one that worked very well for me in testing and production. I work in Windows and use the Windows Subsystem for Linux. https://docs.microsoft.com/en-us/windows/wsl/install-win10 I will be writing Linux commands because I am assuming you will also be using this tool. I will also be assuming that you have a front end client running on a different port than your backend. Let's start with what packages you need (after you already have node and express running). https://www.npmjs.com/package/passport npm install --save passport https://www.npmjs.com/package/passport-bnet npm install --save passport-bnet https://www.npmjs.com/package/dotenv npm install --save dotenv https://www.npmjs.com/package/localtunnel npm install -g localtunnel I will only be going over how to connect passport to bnet and authentication routes. For more information on hooking up passport to your app please refer to the passport docs. http://www.passportjs.org/docs/ Let's start by setting up your environment. Go ahead and create your .env file in your root directory and as early as possible in your application, require and configure dotenv. require('dotenv').config() Inside of your .env file create these variables. Remember to never push this up to your repository to protect your keys. BNET_ID='insertKeyHere' BNET_SECRET='insertSecretHere' Create a constants file (constants.js) and let's define your domains. The Callback URL is https (localtunnel allows this) because that's what Blizzard requires. let constants = {}; if (process.env.NODE_ENV === 'production') { constants.DOMAIN = ''; constants.CALLBACKURL = '/auth/bnet/callback' } else { constants.DOMAIN = 'http://localhost:' + frontEndPort; constants.CALLBACKURL = 'https://myapp.localtunnel.me/auth/bnet/callback' } module.exports = constants; Ok, your domains are setup. Let's now look at our routes. The first route is going to be what your application redirects to when a user clicks the login button. It will handle the redirect to Bnet. The second route (callback) is what Bnet is looking for after the user has entered their credentials. In this callback route you will decide where the user is redirected to after they login through Bnet. const passport = require('passport'); const constants = require('/path/to/constants.js'); /*========================= Bnet OAuth2 Navigate to ===========================*/ router.get('/auth/bnet', (req, res, next) => { passport.authenticate('bnet', (err, user, info) => { if (err) { return next(err) } })(req, res, next); }); /*============================ Bnet OAuth2 Callback Route ==============================*/ router.get('/auth/bnet/callback', (req, res, next) => { passport.authenticate('bnet', { failureRedirect: constants.DOMAIN + '/loginFailure' }, (err, user, info) => { if (err) { return next(err); } console.log(user); res.redirect(constants.DOMAIN + '/loginSuccess' ); })(req, res, next); }); Now that the routes are all setup, we need to configure passport-bnet. After you have setup your initial passport (look at passport guides) we will configure the BnetStrategy. const constants = require('/path/to/constants.js'); const passport = require('passport'); const BnetStrategy = require('passport-bnet').Strategy; passport.use(new BnetStrategy({ clientID: process.env.BNET_ID, clientSecret: process.env.BNET_SECRET, callbackURL: constants.CALLBACKURL, region: 'us' }, (accessToken, refreshToken, profile, done) => { // Profile returns the Bnet Id, Battletag return done(null, profile); })); Alright, good work. On your website you will create a button or an a tag with an href pointing to your '/auth/bnet' route. However, in your development build, this needs to point to the URL that localtunnel gives you. I will show you how to run localtunnel after you create this button. In production, it will just point to your normal URL with the /auth/bnet route. <a href="https://myapp.localtunnel.me/auth/bnet/">Login with Bnet</a> Let's startup localtunnel. Open your bash shell (using the Windows Subsystem for Linux) and run lt --port 8080 --subdomain myapp A few things to keep in mind. This port needs to be your backend port. The subdomain also must be unique throughout the world. If you all use 'myapp', only one person is actually going to get the myapp subdomain. Now open up another bash shell and startup your node server with this command. NODE_ENV=development node app.js When it's production you will use this command instead. NODE_ENV=production node app.js When you click your button, it doesn't work. Wtf, Uglyer I followed your guide to the T! Don't panic, we just need to tell Bnet what our Callback URL is. You need to login to your dev.battle.net portal and follow these steps. Click on My Account -> Applications -> Edit -> scrolldown and enter your Callback URL (the same from the constants file depending on whether you are in development or production) into that textbox and hit save. It might take a few minutes to update on Bnet's side. A few things to remember is that if you do not use a constants file on your front end you will need to change the link on your button to be your Production URL when you deploy. The other place that is not dynamic will be the Callback URL on dev.battle.net, this will also need to be manually changed as you deploy your app. I hope this made sense and actually helps a few of you! Let me know what questions you have or if I've just messed up completely :P EXTRA: Get a user's WoW characters. Let's take a look back at the passport-bnet configuration. It gives us an Access Token to be used to gain information about the user. Let's use it to get the user's WoW characters. To make http requests from the server I use the package axios. https://www.npmjs.com/package/axios npm install --save axios I'm going to rewrite the passport-bnet config code here. Notice in the options portion of the BnetStrategy that I add a 'scope' parameter. Also, if you have any information coming from the request, you can pass it into your callback function with the 'passReqToCallback' parameter. const constants = require('/path/to/constants.js'); const passport = require('passport'); const BnetStrategy = require('passport-bnet').Strategy; const axios = require('axios'); passport.use(new BnetStrategy({ clientID: process.env.BNET_ID, clientSecret: process.env.BNET_SECRET, scope: 'wow.profile', callbackURL: constants.CALLBACKURL, region: 'us', passReqToCallback: true, }, (req, accessToken, refreshToken, profile, done) => { axios({ method: 'get', url: 'https://us.api.battle.net/wow/user/characters', headers: { 'Authorization': 'Bearer ' + accessToken } }) .then(response => { // Info about the user console.log(response.data); // User's characters console.log(response.data.characters); }) .catch(err => { return done(err); }); }));Uglyer3 Mar 8
Mar 8 401 bad client credential hi blizzard, i cant sync my twitch desktop app with my battle.net account, i always got error 401 bad client credentialsdraknar5 Mar 8
Mar 5 Open Source C# project example I have been maintaining https://wowloremaster.com for about a year now, but I will not be renewing my hosting contract. I loved working on the project, but I was never able to get the kind of traffic to monetize the site. I have decided to release the code on GitHub under the MIT license in the hopes that someone else may be able to make something out of it, or at least serve as an example of production code interfacing with the Blizzard APIs in C#. In the project you can find examples of how to perform user authentication and the client credential workflow for getting character data. (There are also some fine examples of how NOT to use jQuery . . ) For now I will host a copy of the app on my main website https://croncosoftware.com/loremaster, but I will no longer be maintaining either the internal build or the public build. The GitHub repo is https://github.com/Cronco-Software/Wow-Loremaster. I hope someone finds it useful!Delzune0 Mar 5
Mar 3 Starcraft 2 Achievements Heya. How do I know which of the things listed under the sc2 achievements list are actual achievements? WARCHESTSEASON2CONSOLETERRANRW with id:91475325922456 for example doesn't seem to me like a real achievement. Also, what are the flags? Their distribution is as follows: 2: 903 4: 70 0: 635 320: 34 256: 366 49154: 22 258: 151 12: 38 260: 10 2048: 15 2304: 35 4108: 52 16386: 5 8448: 6 64: 3 So I guess it's a bitfield? But what does the individual bits mean?primalr0 Mar 3
Mar 1 Warfront Contributions in API Since it is changing daily now, is it possible to get this information via the API? Are there plans to provide this information via the API?ihsw1 Mar 1
Mar 1 Log in with Battle.net on third-party sites Many Warcraft fan sites are offering contests that use the log in with Battle.net OAuth approval to enter. https://dev.battle.net/docs/read/log_in_with_bnet When you go through the process it asks for approval to give the 3rd party access to- "Your Battle.net Account ID and BattleTag". http://i.imgur.com/bfDdSrK.jpg What exactly is your Battle.net Account ID? real name? email? It is not immediately obvious to me what this is. On the Warcraft login screen and on the Battle.net account services webpage it refers to your email address as your "Account Name". Your real name is referred to as "Name". I value privacy and would like clarification on what specific information the Battle.net login authorizes for 3rd parties. For other Battle.net users- How comfortable are you with letting 3rd party websites build databases on your Battle.net account information? Should parental controls be able to restrict this type of "Login with Battle.net" to protect the privacy of children who can't necessarily make informed decisions about their privacy?Reddrake13 Mar 1
Feb 27 worldofwarcraft.com character profiles URL pattern change Greetings developers, While we do not normally announce changes to the worldofwarcraft.com website on this forum, we have recently released a change that will likely impact many community websites. With this release, we have made changes to the URL pattern for the character profiles on worldofwarcraft.com. If you are linking to the official game site (worldofwarcraft.com) from your community site or other experiences, we recommend updating any URLs appropriately. Old pattern: https://worldofwarcraft.com/:locale/character/:realm-slug/:character-name Example: https://worldofwarcraft.com/en-us/character/illidan/Snutzr New pattern: https://worldofwarcraft.com/:locale/character/:region/:realm-slug/:character-name Example: https://worldofwarcraft.com/en-us/character/us/illidan/Snutzr While you update your applications and experiences, we have included redirects for requests which do not explicitly include a region. In these cases, we will use the region based on the locale of the request. Original request: https://worldofwarcraft.com/en-us/character/illidan/Snutzr Redirected to: https://worldofwarcraft.com/en-us/character/us/illidan/Snutzr The main benefit of this update is that character profiles are no longer attached to specific locales, allowing you to link and view profile pages of characters on German realms (for example) without also having to view those characters using the German locale (de-DE). For example, an EU character can now be viewed in the ko-KR locale (https://worldofwarcraft.com/ko-kr/character/eu/ravencrest/Chas). Thanks for your time, - MaguthulMaguthul0 Feb 27
Feb 27 Concerns/Issues with Client Secret Requirement for Community APIs It appears the client_secret is required for any use of the new APIs. This results in several types of applications becoming either 1) invalid under the API terms or 2) overly complex for users and developers. There are two connected questions that many developers are already very worried about, especially with only 3 months before the existing API cutoff: Can I choose to publish my client_secret knowing the risks? Will there be a method to get an access token without a client secret? If so, will this be available before Jan 6, 2019? Off the top of my head, there are several types of applications that are facing these issues: Static website Local application Standalone native application Shared/copyable web application (Google Sheets, Glitch, etc) Basically, any application that doesn't have their own dedicated backend will be facing these issues. To note upfront, the Battle.net authorization for users of these systems does not address these issues as it requires the application to get an access_token which requires the client_secret. Requiring "normal" users to generate and enter their own developer clients is also highly undesirable. As far as I can tell, the risks to exposing your client_secret are rate limit denial of service or unauthorized use of your client. I believe many developers would explicitly choose this tradeoff for the significant simplification for themselves and their users. Many of these applications must use this approach right now and large projects like SimC have not had issues with those vectors of attack. Based on the terms and current API authentication design, many existing applications or app features will not be allowed/possible with the new API system.seriallos22 Feb 27
Feb 25 question about the new api systems Hello dear developers, i do programming as a hobby (i started it 2 years ago...) and i had a small wow app in the apple app store which i pulled off a few months ago since i didn't have any time to update it. now i have finally the time to get back to programming and i would love to update my app. Since the apikey system is gone i have 2 questions: i understand that i need to get an access token, the access token is only good for 24 hours. Does this mean i have to do a tokenrequest in the app on the customer device with my personal blizzard account client id & secret id to get the token to get access to the api system? (i am using only public api) do you have a separate blizzard developer account? thank you in advanceWizz6 Feb 25
Feb 24 Overwatch API Hello, I have a little question for the Overwatch developers. I'm aware that not much info has been released about Overwatch, but I'd really like to know if you're planning on releasing the API on launch or shorty after? The Hearthstone situation really worries me, since an API for that still hasn't been released. Thank you, sprEEEzysprEEEzy26 Feb 24
Feb 24 Missing the Overwatch API Please add Overwatch to the API list, maybe also StarCraft Remastered :) I would like to see some statistics based on the played games, could be the ones shown when you hit tab in the game. E.g. how much did you heal, blocking damage, or medals. It may only be for the last week or month, it would just be nice to have access some information. Diablo 3, StarCraft 2, World of Warcraft, has API endpoints, why not Overwatch? ThanksLogifire5 Feb 24