---
name: wow-web-api
description: >-
Builds things outside the game with Blizzard's Web API (the Battle.net API): Discord
bots, web pages, scripts and spreadsheets that fetch World of Warcraft data from
Blizzard's servers – characters, equipment, Mythic+, guild members, realms, the auction
house, the WoW Token, items and images. Covers how to get access (the developer portal,
client, key), OAuth, regions and namespaces, limits, Blizzard's terms and a ready
template for a Discord bot. Use this skill when the user wants to build something that
is not an addon, mentions Blizzard API, Battle.net API, Discord bot, guild page, fetching
character data, prices or rankings outside the game – even if it is only described as
"a bot that shows ..." or "a page that lists ...".
---
# Building with Blizzard's Web API
An addon runs inside the game. Blizzard's Web API is something else: Blizzard's servers
answer questions over the internet, so that programs outside the game – a Discord bot, a
web page, a script – can show WoW data. The API can only **read** data. It cannot control
the game or send anything to it, and character data is updated only when the player logs
out.
Lead the user as in `wow-new-addon`: understand the idea, check that it is allowed, show
a proposal, build, and test together. If the user does not program, explain each step in
everyday words.
Files in this skill:
| File | When you read it |
|---|---|
| `references/blizzard-api.md` | Always – access, OAuth, addresses, namespaces, limits, terms and which APIs exist |
| `references/discord-bot.md` | When it is to be a Discord bot |
| `assets/discord-bot/` | The template for a Discord bot in Node.js |
## Safety – applies all the time
- **The user does it themselves**: creates accounts, turns on the Battle.net
Authenticator, accepts terms, creates clients and keys, and writes them into the `.env`
file. Never ask for a key, a password or a bot token in the chat. If the user pastes one
anyway: do not use it, and ask them to create a new one and delete the old one.
<!-- ‹guest · 2026-11-29› -->
- **`.env` never goes into git.** The template's `.gitignore` leaves it out. Check that
before every commit.
- **Ask first** before anything becomes public or leaves the computer: inviting a bot to a
server, starting it on a server on the internet, publishing code or a web page.
## 1. Understand the idea and check it
1. Ask what the user wants to see, where (Discord, web page, spreadsheet) and for whom
(themselves, a guild, everyone).
2. Check in `references/blizzard-api.md` that the data exists in the API. Not everything
visible in the game is there – e.g. no combat logs, no chat and nothing happening right
now in the game.
3. Check Blizzard's terms (the table in `references/blizzard-api.md`): no paid features,
Blizzard named as the source, no Blizzard trademarks such as "WoW" or "Warcraft" in the
name, data stored for at most 30 days, and a privacy policy.
4. Rate every wanted feature ✅/⚠️/⛔ and show a short proposal in everyday words. Wait for
a yes.
## 2. Give the user access
Go through the steps in "Access" in `references/blizzard-api.md` with the user, one at a
time. A Discord bot also needs a Discord app, as described in `references/discord-bot.md`.
## 3. Build
- **Discord bot**: start from `assets/discord-bot/` and follow `references/discord-bot.md`.
- **Something else** (web page, script, spreadsheet): reuse
`assets/discord-bot/src/blizzard.js`. It fetches the key, keeps it for 24 hours, sets the
right namespace and language and handles the limits.
- Verify every endpoint and its response in Blizzard's documentation
(community.developer.battle.net) before the code relies on it. Never guess field names –
fetch a real response and look at it.
- Always show "Data: Blizzard Entertainment" or similar where the data is shown.
## 4. Test and hand over
1. Run on the user's computer first, against a test server in Discord or a local page.
2. Try with real names, a name that does not exist, and a realm with a space or an
apostrophe in its name.
3. Write an `AGENTS.md` in the project: purpose, which APIs are used, where the keys are
<!-- ‹guest · 2026-11-29› -->
(never the keys themselves), how to start and test.
4. If it is to run around the clock, it needs a computer or server that is always on – see
"Deployment" in `references/discord-bot.md`. Ask before anything is put online.
این نسخه با نشانهگذاری اختصاصی حساب شما نمایش داده میشود. برای نصب سریع، به تب نصب و راهاندازی بروید.