Battle.net API

Games & Comics / OAuth Advanced HTTPS CORS
Varies by plan (check documentation)

Overview

The Battle.net API provides official game data for Blizzard titles including World of Warcraft, Diablo III, Hearthstone, and StarCraft II. Authentication uses OAuth 2.0 client credentials, which is simpler than user OAuth—you can get a token using just your client ID and secret. It is the go-to source for building WoW character profiles, item databases, and esports stat trackers.

💡

Beginner Tip

Use the client credentials OAuth flow (not user login) to get an access token with just your client ID and secret—no user interaction required for game data endpoints. Register your app at develop.battle.net.

Available Data

Battle.net data via REST API
JSON-formatted response data
Requires OAuth authentication

Example Response

JSON Response
{
  "id": 1,
  "name": "Battle.net",
  "data": "Diablo III, Hearthstone, StarCraft II and World of Warcraft game data APIs",
  "source": "Battle.net"
}

Field Reference

access_token OAuth bearer token to use in subsequent API requests
token_type Always bearer—how to use the token in the Authorization header
expires_in Token validity in seconds, typically 86400 (24 hours)
scope Permission scopes granted to this token

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://develop.battle.net/documentation/guides/getting-started";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "Authorization": "Bearer YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Access token is missing, expired, or has wrong scope
Request a fresh token using the client credentials flow and pass it as Authorization: Bearer YOUR_ACCESS_TOKEN
404 Not Found on game data endpoint Wrong region in the base URL
Use the correct regional URL: us.api.blizzard.com, eu.api.blizzard.com, or kr.api.blizzard.com
403 Forbidden The requested namespace or game requires additional permissions
Check the namespace parameter—use static-us, dynamic-us, or profile-us depending on the data type

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 8/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth OAuth
HTTPS REQUIRED
CORS YES
Category Games & Comics
Difficulty Advanced
Verified: 2026-04-07

Similar APIs

View All →