### Battle.net API Request Flow and Throttling Source: https://develop.battle.net/documentation/guides/getting-started Demonstrates obtaining an OAuth access token using client credentials and making a subsequent API request. Includes details on URI construction and API throttling limits. ```shell curl -u {client_id}:{client_secret} -d grant_type=client_credentials https://oauth.battle.net/token ``` ```shell curl -H "Authorization: Bearer {access_token}" https://us.api.blizzard.com/data/wow/token/?namespace=dynamic-us ``` ```json { "_links": { "self": { "href": "https://us.api.blizzard.com/data/wow/token/index?namespace=dynamic-us" } }, "last_updated_timestamp": 1536597360000, "price": 1138480000 } ``` ```APIDOC API Throttling: - Limited to 36,000 requests per hour. - Rate limit of 100 requests per second. - Exceeding hourly quota results in slower service. - Exceeding per-second limit results in a 429 error for the remainder of the second. ``` -------------------------------- ### Battle.net API Client Management Source: https://develop.battle.net/documentation/guides/getting-started Details on creating, managing, and the properties of Battle.net API clients, including necessary prerequisites and client attributes. Developers are limited to 50 clients. ```APIDOC Battle.net API Client Lifecycle: Prerequisites for API Usage: - A Battle.net account is required. If one does not exist, create a new account. - A Battle.net Authenticator must be attached to the account for two-factor authentication. - The Blizzard Developer API Terms of Use must be accepted. Client Creation: Steps: 1. Log in to the Developer Portal. 2. Navigate to the 'API Access' menu option. 3. Click 'Create New Client'. Client Details: - Client Name: A unique identifier for the client, visible to users. - Redirect URIs: The URI to redirect users to after OAuth authorization. - Service URL: The URL of the service using the client (optional, can be added later). - Intended Use: A description of how the client will be used (e.g., displaying character data). Action: Click 'Create' to finalize client creation. Client Management: Access: 1. Go to the 'Clients' page in the Developer Portal. 2. Click 'Manage Client' for the desired client. Managed Information: - Client ID: The unique identifier for the client. - Client Secret: A secret key associated with the client. - Generate New Client Secret: Option to rotate the client secret. - Client Name: The name assigned during creation. - Client Redirect URIs: Configured redirect URIs. - Service URL: The associated service URL. - Intended Use: The specified purpose of the client. ``` -------------------------------- ### Battle.net API Getting Started Source: https://develop.battle.net/documentation/world-of-warcraft Instructions for setting up your client and secret to use the Battle.net APIs. This is a prerequisite for accessing any API data. ```APIDOC Section: Getting Started Purpose: To guide developers through the initial setup required to authenticate and interact with Battle.net APIs. Key Steps: 1. Register a client application on the Battle.net Developer Portal. 2. Obtain your unique Client ID and Client Secret. 3. Implement an authentication flow (e.g., OAuth 2.0) using your credentials. Reference: - https://develop.battle.net/documentation/guides/getting-started ``` -------------------------------- ### Diablo III Community APIs Reference Source: https://develop.battle.net/documentation/diablo-3 Provides access to Diablo III player profiles, acts, crafting, classes, skills, followers, and items. Requires client setup as per Getting Started guide. ```APIDOC API Group: Diablo III Community APIs Description: Endpoints for Diablo III player profiles, acts, crafting, classes, skills, followers, and items. Access: Requires OAuth 2.0 authentication and client credentials. Endpoints: - Player Profiles: Access detailed information about Diablo III players. - Acts: Retrieve data related to game acts. - Crafting: Information on crafting recipes and materials. - Classes: Details on character classes and their abilities. - Skills: Data on character skills. - Followers: Information about in-game followers. - Items: Access to item data and properties. See full reference at: https://develop.battle.net/documentation/diablo-3/community-apis ``` -------------------------------- ### Hearthstone Game Data APIs Overview Source: https://develop.battle.net/documentation/hearthstone Provides access to Hearthstone game data including cards, decks, and metadata. Requires client setup as described in Getting Started. ```APIDOC Hearthstone Game Data APIs: Description: Endpoints for Hearthstone cards, decks, and metadata. Related Guides: - Hearthstone Localization - Hearthstone Metadata - Hearthstone Card Search - Hearthstone Game Modes - Hearthstone Card Backs - Retrieving Hearthstone Decks Access: Requires client and secret setup via Getting Started guide. ``` -------------------------------- ### World of Warcraft Media API Examples Source: https://develop.battle.net/documentation/world-of-warcraft/guides/media-documents Examples demonstrating the structure of Item documents and their associated Media documents within the World of Warcraft API. These documents link to web resources such as item icons. ```APIDOC World of Warcraft Media API Examples: Sample Item Document: This JSON structure represents an item in the World of Warcraft API and includes a 'media' field that links to a generic media document. ```json { "_links": { "self": { "href": "https://us.api.blizzard.com/data/wow/item/19019?namespace=static-us" } }, "id": 19019, "name": { "en_US": "Thunderfury, Blessed Blade of the Windseeker", "es_MX": "Trueno Furioso, espada bendita del Hijo del Viento", "pt_BR": "Tormentária, Lâmina Sagrada do Perseguidor dos Ventos", "de_DE": "Donnerzorn, Gesegnete Klinge des Windsuchers", "en_GB": "Thunderfury, Blessed Blade of the Windseeker", "es_ES": "Trueno Furioso, Espada Bendita del Hijo del Viento", "fr_FR": "Lame-tonnerre, épée bénie du Cherchevent", "it_IT": "Furiatonante, Lama Benedetta del Vento Eterno", "ru_RU": "Громовая Ярость, благословенный клинок Искателя Ветра", "ko_KR": "우레폭풍 - 바람추적자의 성검", "zh_TW": "雷霆之怒,逐風者的祝福之刃", "zh_CN": "雷霆之怒,逐风者的祝福之剑" }, "media": { "key": { "href": "https://us.api.blizzard.com/data/wow/media/item/19019?namespace=static-us" }, "id": 19019 } } ``` Sample Media Document: This JSON structure represents a generic media document, containing an 'assets' array with links to actual web resources like item icons. ```json { "_links": { "self": { "href": "https://us.api.blizzard.com/data/wow/media/item/19019?namespace=static-us" } }, "assets": [ { "key": "icon", "value": "https://render-us.worldofwarcraft.com/icons/56/inv_sword_39.jpg" } ], "id": 19019 } ``` Note: It is strongly encouraged to store copies of these resources on your own servers rather than linking directly to Blizzard resources. ``` -------------------------------- ### JSON Example with Localization Source: https://develop.battle.net/documentation/guides/game-data-apis Example of a JSON response showing localized names for a resource. ```JSON { "key": { "href": "https://us.api.blizzard.com/data/wow/journal-instance/758?namespace=static-us" }, "name": { "en_US": "Icecrown Citadel", "es_MX": "Ciudadela de la Corona de Hielo", "pt_BR": "Cidadela da Coroa de Gelo", "de_DE": "Die Eiskronenzitadelle", "en_GB": "Icecrown Citadel", "es_ES": "Ciudadela de la Corona de Hielo", "fr_FR": "Citadelle de la Couronne de glace", "it_IT": "Rocca della Corona di Ghiaccio", "ru_RU": "Цитадель Ледяной Короны", "ko_KR": "얼음왕관 성채", "zh_TW": "冰冠城塞", "zh_CN": "冰冠堡垒" }, "id": 758 } ``` -------------------------------- ### World of Warcraft Game Data APIs Source: https://develop.battle.net/documentation/world-of-warcraft Endpoints for accessing World of Warcraft game information such as mythics, realms, and other data. Requires client and secret setup as per Getting Started guide. ```APIDOC API Category: World of Warcraft Game Data APIs Description: Provides access to static and dynamic game data for World of Warcraft. Key Features: - Mythic information - Realm status and data - Other game-specific information Prerequisites: - Client ID and Client Secret obtained from the Battle.net Developer Portal. - Understanding of OAuth 2.0 for authentication. Related Guides: - Namespaces: https://develop.battle.net/documentation/world-of-warcraft/guides/namespaces - Localization: https://develop.battle.net/documentation/world-of-warcraft/guides/localization - Media Documents: https://develop.battle.net/documentation/world-of-warcraft/guides/media-documents - Search: https://develop.battle.net/documentation/world-of-warcraft/guides/search Access: - View API Reference: https://develop.battle.net/documentation/world-of-warcraft/game-data-apis ``` -------------------------------- ### Diablo III Game Data APIs Reference Source: https://develop.battle.net/documentation/diablo-3 Provides access to Diablo III seasons, eras, and leaderboards. Requires client setup as per Getting Started guide. ```APIDOC API Group: Diablo III Game Data APIs Description: Endpoints for Diablo III seasons, eras, and leaderboards. Access: Requires OAuth 2.0 authentication and client credentials. Endpoints: - Seasons: Retrieve information about Diablo III seasons. - Eras: Access data related to Diablo III eras. - Leaderboards: Fetch leaderboard data for various game modes and regions. See full reference at: https://develop.battle.net/documentation/diablo-3/game-data-apis ``` -------------------------------- ### Battle.net API Access and Setup Source: https://develop.battle.net/documentation/guides Developers must set up an OAuth client ID and secret before accessing Battle.net public APIs. This involves understanding the authorization flows and managing client credentials. ```APIDOC API Access: - Obtain OAuth Client ID and Secret - Manage OAuth Clients Authentication: - OAuth 2.0 Authorization Code Flow - OAuth 2.0 Client Credentials Flow Key Concepts: - API Keys - Scopes - Tokens (Access Token, Refresh Token) ``` -------------------------------- ### Battle.net Regionality and APIs Source: https://develop.battle.net/documentation/guides This guide explains how Battle.net implements region-based concepts to deliver game data to consumers. Understanding regionality is crucial for making accurate API requests and handling data correctly. ```APIDOC Regionality and APIs: - Region-based Data Delivery - Handling Regional Differences - API Endpoints by Region - Data Consistency Across Regions ``` -------------------------------- ### World of Warcraft Classic Item Document Example Source: https://develop.battle.net/documentation/world-of-warcraft-classic/guides/media-documents This JSON structure represents an item document from the World of Warcraft Classic API. It includes basic item information and a 'media' key that links to a separate media document for asset details. ```json { "_links": { "self": { "href": "https://us.api.blizzard.com/data/wow/item/19019?namespace=static-us" } }, "id": 19019, "name": { "en_US": "Thunderfury, Blessed Blade of the Windseeker", "es_MX": "Trueno Furioso, espada bendita del Hijo del Viento", "pt_BR": "Tormentária, Lâmina Sagrada do Perseguidor dos Ventos", "de_DE": "Donnerzorn, Gesegnete Klinge des Windsuchers", "en_GB": "Thunderfury, Blessed Blade of the Windseeker", "es_ES": "Trueno Furioso, Espada Bendita del Hijo del Viento", "fr_FR": "Lame-tonnerre, épée bénie du Cherchevent", "it_IT": "Furiatonante, Lama Benedetta del Vento Eterno", "ru_RU": "Громовая Ярость, благословенный клинок Искателя Ветра", "ko_KR": "우레폭풍 - 바람추적자의 성검", "zh_TW": "雷霆之怒,逐風者的祝福之刃", "zh_CN": "雷霆之怒,逐风者的祝福之剑" }, "media": { "key": { "href": "https://us.api.blizzard.com/data/wow/media/item/19019?namespace=static-us" }, "id": 19019 } } ``` -------------------------------- ### World of Warcraft Classic Media Document Example Source: https://develop.battle.net/documentation/world-of-warcraft-classic/guides/media-documents This JSON structure represents a media document from the World of Warcraft Classic API. It contains an 'assets' array, where each asset object has a 'key' (e.g., 'icon') and a 'value' pointing to the actual web resource URL. ```json { "_links": { "self": { "href": "https://us.api.blizzard.com/data/wow/media/item/19019?namespace=static-us" } }, "assets": [ { "key": "icon", "value": "https://render-us.worldofwarcraft.com/icons/56/inv_sword_39.jpg" } ], "id": 19019 } ``` -------------------------------- ### World of Warcraft Profile APIs Source: https://develop.battle.net/documentation/world-of-warcraft Endpoints for retrieving World of Warcraft character profiles, including Mythic Keystone profiles and seasonal data. Requires client and secret setup. ```APIDOC API Category: World of Warcraft Profile APIs Description: Provides access to player character data and profiles within World of Warcraft. Key Features: - Character profiles - Mythic Keystone profiles - Seasonal profiles Prerequisites: - Client ID and Client Secret obtained from the Battle.net Developer Portal. - Understanding of OAuth 2.0 for authentication. Related Guides: - Character Renders: https://develop.battle.net/documentation/world-of-warcraft/guides/character-renders Access: - View API Reference: https://develop.battle.net/documentation/world-of-warcraft/profile-apis ``` -------------------------------- ### Diablo III Community APIs Reference (CN) Source: https://develop.battle.net/documentation/diablo-3 Provides access to Diablo III player profiles, acts, crafting, classes, skills, followers, and items for the China region. Requires client setup. ```APIDOC API Group: Diablo III Community APIs – CN Description: CN endpoints for Diablo III player profiles, acts, crafting, classes, skills, followers, and items. Access: Requires OAuth 2.0 authentication and client credentials. Endpoints: - Player Profiles (CN): Access detailed information about Diablo III players in China. - Acts (CN): Retrieve data related to game acts in China. - Crafting (CN): Information on crafting recipes and materials for China. - Classes (CN): Details on character classes and their abilities for China. - Skills (CN): Data on character skills for China. - Followers (CN): Information about in-game followers in China. - Items (CN): Access to item data and properties for China. See full reference at: https://develop.battle.net/documentation/diablo-3/community-apis-cn ``` -------------------------------- ### Get Hearthstone Deck by Code Source: https://develop.battle.net/documentation/hearthstone/game-data-apis Finds a Hearthstone deck using its deck code. This endpoint allows users to retrieve deck details based on a provided code. It is crucial for reconstructing or viewing deck information. Refer to the [Retrieving Decks Guide](https://develop.battle.net/documentation/hearthstone/guides/decks) for more information. ```APIDOC GET /hearthstone/deck Description: Finds a deck by deck code. Parameters: - deckCode (string, Required): The code representing the deck. ``` -------------------------------- ### Get Hearthstone Deck by Card List Source: https://develop.battle.net/documentation/hearthstone/game-data-apis Retrieves a Hearthstone deck based on a provided list of card IDs and an optional hero. This endpoint is useful for reconstructing or validating decks. It can also accept a deck code for direct lookup. For more details, refer to the [Retrieving Decks Guide](https://develop.battle.net/documentation/hearthstone/guides/decks). ```APIDOC GET /hearthstone/deck Finds a deck by list of cards, including the hero. Parameters: :region (string, Required): The region of the data to retrieve. locale (string): The locale to reflect in localized data. code (string): A code that identifies a deck. You can copy one from the game or various Hearthstone websites. The value should be URL encoded. Ignored if 'ids' and 'hero' are present. ids (string): A list of card IDs representing cards in the deck. Ignored if a 'code' parameter is also present. hero (string): The card ID for the hero of the deck. Used along with 'ids'. If not present, the API will attempt to add a default hero and class based on the cards in the deck. ``` -------------------------------- ### Battle.net OAuth 2.0 Parameters Source: https://develop.battle.net/documentation/guides/using-oauth Essential parameters required to initiate the OAuth 2.0 authentication flow with the Battle.net API. These are typically used with OAuth libraries to handle authorization and token retrieval. ```APIDOC OAuth 2.0 Parameters: Developers typically need the following four items to get started with OAuth 2.0 authentication: 1. **client_id** - Description: Your unique application identifier obtained from the Battle.net API Access tool. - Type: String 2. **client_secret** - Description: Your confidential application secret, used to authenticate your application with the authorization server. - Type: String 3. **authorize_uri** - Description: The URI endpoint where users are redirected to grant authorization to your application. - Type: URI 4. **token_uri** - Description: The URI endpoint where your application exchanges an authorization grant for an access token. - Type: URI Usage: These parameters are used by OAuth 2.0 libraries to manage the authorization code flow, client credentials flow, and other authentication mechanisms. For many libraries, only these URIs, along with the client ID and secret, are needed. Some platforms may also utilize plugins that are pre-configured with these URLs and the ability to retrieve user profile information. ``` -------------------------------- ### Get Hearthstone Deck by Code Source: https://develop.battle.net/documentation/api-reference/hearthstone-game-data-api Finds a Hearthstone deck using its deck code. This endpoint allows users to retrieve deck details based on a provided code. It is crucial for reconstructing or viewing deck information. Refer to the [Retrieving Decks Guide](https://develop.battle.net/documentation/hearthstone/guides/decks) for more information. ```APIDOC GET /hearthstone/deck Description: Finds a deck by deck code. Parameters: - deckCode (string, Required): The code representing the deck. ``` -------------------------------- ### Get Hearthstone Deck by Card List Source: https://develop.battle.net/documentation/api-reference/hearthstone-game-data-api Retrieves a Hearthstone deck based on a provided list of card IDs and an optional hero. This endpoint is useful for reconstructing or validating decks. It can also accept a deck code for direct lookup. For more details, refer to the [Retrieving Decks Guide](https://develop.battle.net/documentation/hearthstone/guides/decks). ```APIDOC GET /hearthstone/deck Finds a deck by list of cards, including the hero. Parameters: :region (string, Required): The region of the data to retrieve. locale (string): The locale to reflect in localized data. code (string): A code that identifies a deck. You can copy one from the game or various Hearthstone websites. The value should be URL encoded. Ignored if 'ids' and 'hero' are present. ids (string): A list of card IDs representing cards in the deck. Ignored if a 'code' parameter is also present. hero (string): The card ID for the hero of the deck. Used along with 'ids'. If not present, the API will attempt to add a default hero and class based on the cards in the deck. ``` -------------------------------- ### Get User Account ID and BattleTag Source: https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow Retrieves the user's Account ID and BattleTag by making a GET request to the /oauth/userinfo endpoint. Requires a valid access token in the Authorization header. ```APIDOC Endpoint: https://oauth.battle.net/userinfo Method: GET Authentication: Authorization: Bearer Request: Make a GET request to 'https://oauth.battle.net/userinfo' with the 'Authorization' header set. Example CURL Request: curl -X GET 'https://oauth.battle.net/userinfo' -H 'Authorization: Bearer ' Response: Returns user's Account ID and BattleTag, allowing identification of the logged-in player. ``` -------------------------------- ### Battle.net Namespace Specification in Requests Source: https://develop.battle.net/documentation/world-of-warcraft-classic/guides/namespaces Explains the two primary methods for specifying a namespace in Battle.net API requests: using the 'Battlenet-Namespace' header or the 'namespace' query parameter. ```APIDOC Namespace Specification Methods: Method 1: Header Header Name: Battlenet-Namespace Format: Battlenet-Namespace: {namespace} Example: Battlenet-Namespace: static-classic-us Method 2: Query Parameter Parameter Name: namespace Format: ?namespace={namespace} Example: ?namespace=static-classic-us ``` -------------------------------- ### World of Warcraft API Namespaces Source: https://develop.battle.net/documentation/world-of-warcraft/profile-apis Explains the requirement for a namespace parameter in World of Warcraft profile API requests. Namespaces can be provided via a header or a query parameter. ```APIDOC Namespaces: All World of Warcraft profile API requests require a namespace. Methods of submission: 1. Header: `Battlenet-Namespace: {namespace}` 2. Query Parameter: `?namespace={namespace}` Each endpoint specifies the correct namespace to use. See [World of Warcraft Namespaces](https://develop.battle.net/documentation/world-of-warcraft/guides/namespaces) for more information. ``` -------------------------------- ### GET Character Statistics API Source: https://develop.battle.net/documentation/world-of-warcraft-classic/profile-apis Fetches a statistics summary for a character. This endpoint provides aggregated data on character performance, progression, or other game-related metrics. ```APIDOC GET /profile/wow/character/{realmSlug}/{characterName}/statistics Description: Returns a statistics summary for a character. Parameters: :region (string, Required): The region of the data to retrieve. {realmSlug} (string, Required): The slug of the realm. {characterName} (string, Required): The lowercase name of the character. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. ``` -------------------------------- ### Battle.net Namespace Construction Source: https://develop.battle.net/documentation/world-of-warcraft-classic/guides/namespaces Details the structure of Battle.net namespaces, which are formed by combining game version identifiers with region-specific identifiers. This includes static, dynamic, and profile namespaces for various World of Warcraft versions. ```APIDOC Namespace Structure: Static Namespace: static-{game_version}-{region} Dynamic Namespace: dynamic-{game_version}-{region} Profile Namespace: profile-{game_version}-{region} Game Versions: World of Warcraft Classic (Era): classic1x Cataclysm Classic (Progression): classic Region Identifiers: North America: us Europe: eu Korea: kr Taiwan: tw China: cn Example Construction: static-classic1x-us dynamic-classic-cn ``` -------------------------------- ### GET Character Achievements API Source: https://develop.battle.net/documentation/world-of-warcraft-classic/profile-apis Returns a summary of the achievements a character has completed. This endpoint allows clients to display a character's accomplishments and progression within the game. ```APIDOC GET /profile/wow/character/{realmSlug}/{characterName}/achievements Description: Returns a summary of the achievements a character has completed. Parameters: :region (string, Required): The region of the data to retrieve. {realmSlug} (string, Required): The slug of the realm. {characterName} (string, Required): The lowercase name of the character. namespace (string, Required): The namespace to use to locate this document. ``` -------------------------------- ### World of Warcraft Classic API Host Names and Namespaces Source: https://develop.battle.net/documentation/world-of-warcraft-classic/profile-apis Details on constructing API request URLs using regional host names and the required namespace parameter for World of Warcraft Classic profile APIs. Namespaces can be provided via header or query parameter. ```APIDOC API Host Names: For all regions except China: {region}.api.blizzard.com - {region} can be: us, eu, kr, tw For China: gateway.battlenet.com.cn Namespaces: A namespace is required for every API request. Each endpoint specifies the correct namespace to use. Submission methods: - Header: Battlenet-Namespace: {namespace} - Query Parameter: ?namespace={namespace} Example Usage: To access a character profile in the US region: GET https://us.api.blizzard.com/profile/wow/character/{realm}/{characterName}?namespace=profile-us Note: Specific endpoints and their required namespaces are detailed in individual API documentation sections. ``` -------------------------------- ### GET Character Specializations API Source: https://develop.battle.net/documentation/world-of-warcraft-classic/profile-apis Retrieves a summary of a character's specializations. This endpoint is useful for displaying a character's class, spec, and associated abilities or talents. ```APIDOC GET /profile/wow/character/{realmSlug}/{characterName}/specializations Description: Returns a summary of a character's specializations. Parameters: :region (string, Required): The region of the data to retrieve. {realmSlug} (string, Required): The slug of the realm. {characterName} (string, Required): The lowercase name of the character. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. ``` -------------------------------- ### WoW Character Equipment API Source: https://develop.battle.net/documentation/world-of-warcraft/profile-apis Retrieves a summary of the items equipped by a character. Requires realm slug, character name, region, namespace, and optionally locale. ```APIDOC GET /profile/wow/character/{realmSlug}/{characterName}/equipment Description: Returns a summary of the items equipped by a character. Parameters: :region (string, Required): The region of the data to retrieve. {realmSlug} (string, Required): The slug of the realm. {characterName} (string, Required): The lowercase name of the character. namespace (string, Required): The namespace to use to locate this document. locale (string, Optional): The locale to reflect in localized data. ``` -------------------------------- ### Character Appearance API Source: https://develop.battle.net/documentation/world-of-warcraft/profile-apis Retrieves a summary of a character's appearance settings. Requires an access token with the 'wow.profile' scope. ```APIDOC GET /profile/wow/character/{realmSlug}/{characterName}/appearance Description: Returns a summary of a character's appearance settings. Parameters: :region (string, Required): The region of the data to retrieve. {realmSlug} (string, Required): The slug of the realm. {characterName} (string, Required): The lowercase name of the character. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. Authentication: Requires an access token with the **wow.profile** scope acquired via the Authorization Code Flow. ``` -------------------------------- ### Battle.net OAuth Token Validation Source: https://develop.battle.net/documentation/api-reference/oauth-api Verifies a bearer token and retrieves its metadata, including client ID, expiration, and scopes. The POST method is recommended for security. This entry combines GET and POST methods for the same endpoint. ```APIDOC Endpoint: /oauth/check_token Description: Verifies that a given bearer token is valid and retrieves metadata about the token, including the client_id used to create the token, expiration timestamp, and scopes granted to the token. Recommended Method: POST Parameters: grant_type (string, Required): Identifies the type of authorization request being made. For a client credentials grant this value must be `client_credentials`. scope (string): A space-delimited, case-sensitive list of scopes that to which to request access. The user may not grant access to any or all requested scopes. See [Using OAuth](https://develop.battle.net/documentation/guides/using-oauth) for a list of valid scopes. :region (string, Required): The region of the data to retrieve. Example Value: us token (string, Required): The user's bearer token. Example Value: {token} Return Value: Metadata about the token, including client_id, expiration timestamp, and granted scopes. Example Usage (Conceptual): POST /oauth/check_token?region=us HTTP/1.1 Host: example.battle.net Content-Type: application/x-www-form-urlencoded grant_type=client_credentials&scope=profile&token={your_bearer_token} GET /oauth/check_token?region=us&token={your_bearer_token} HTTP/1.1 Host: example.battle.net Related Methods: Obtaining tokens (e.g., client credentials grant). ``` -------------------------------- ### Battle.net OAuth 2.0 URIs and Scopes Source: https://develop.battle.net/documentation/guides/using-oauth Provides essential URIs for OAuth authorization and token exchange, along with scopes required to access specific user profile data. Includes regional variations for URIs. ```APIDOC Battle.net OAuth 2.0 Endpoints and Scopes: OAuth URIs: - Authorize URI: Used to get player authorization for applications. - Token URI: Used to request access tokens. - Check Token Endpoint: Used to verify access token details. Regional URIs: Region | Authorize URI | Token URI -------|---------------|----------- US, EU, APAC | https://oauth.battle.net/authorize | https://oauth.battle.net/token CN | https://oauth.battlenet.com.cn/authorize | https://oauth.battlenet.com.cn/token Note: {region} can be 'us', 'eu', or 'apac'. Check Token Endpoint (All Regions): /oauth/check_token?token={token} Scopes and Associated APIs: Scope | Description | Example API URL ------|-------------|----------------- wow.profile | Access to World of Warcraft characters. | https://us.api.blizzard.com/profile/user/wow sc2.profile | Access to StarCraft II profile. | https://us.api.blizzard.com/sc2/profile/user d3.profile | Access to Diablo III profile. | https://us.api.blizzard.com/d3/profile/user openid | Access user details via OpenID Connect. | https://oauth.battle.net/userinfo Access Token Requirements: Most API requests require an access token obtained via the OAuth client credentials flow. The following endpoints require an access token retrieved via the OAuth authorization code flow: - GET /oauth/userinfo - GET /profile/user/wow - GET /profile/user/wow/protected-character/{realm-id}-{character-id} - GET /profile/user/wow/collections - GET /profile/user/wow/collections/pets - GET /profile/user/wow/collections/mounts Access Token Lifespan: Access tokens last for 24 hours. They expire if the user changes their password, revokes authorization, or their account is locked. ``` -------------------------------- ### Retrieve Specific Uncollectible Hearthstone Card Source: https://develop.battle.net/documentation/hearthstone/guides/card-search Provides an example of how to retrieve a specific uncollectible Hearthstone card using its unique ID. This is useful for cards generated by other game mechanics. ```APIDOC Example: Retrieving an Uncollectible Card To retrieve an uncollectible card (e.g., a Treant generated by Cenarius) using its ID: Endpoint: `https://us.api.blizzard.com/hearthstone/cards/{cardId}` Example Request: ``` https://us.api.blizzard.com/hearthstone/cards/678?locale=en_US ``` Explanation: - Replace `{cardId}` with the ID of the uncollectible card (e.g., 678 for Treant). - The `locale` parameter specifies the language for the returned data. ``` -------------------------------- ### Item APIs Source: https://develop.battle.net/documentation/world-of-warcraft/game-data-apis Provides access to item information, including retrieving an item by ID, performing item searches, and fetching item media. Requires region, namespace, and optionally locale. Item search supports additional parameters like name, orderby, and page. ```APIDOC GET /data/wow/item/{itemId} Returns an item by ID. Parameters: :region (string, Required): The region of the data to retrieve. {itemId} (string, Required): The ID of the item. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. GET /data/wow/search/item Performs a search of items. See the Search Guide for more detail. Parameters: :region (string, Required): The region of the data to retrieve. namespace (string, Required): The namespace to use to locate this document. name.en_US (string): The name of the item (example search field). orderby (string): The field to sort the result set by. _page (integer): The result page number. GET /data/wow/media/item/{itemId} Returns media for an item by ID. Parameters: :region (string, Required): The region of the data to retrieve. {itemId} (integer, Required): The ID of the item. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. GET /data/wow/item-class/index Returns an index of item classes. Parameters: :region (string, Required): The region of the data to retrieve. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. GET /data/wow/item-class/{itemClassId} Returns an item class by ID. Parameters: :region (string, Required): The region of the data to retrieve. {itemClassId} (integer, Required): The ID of the item class. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. ``` -------------------------------- ### Region Index and Details API Source: https://develop.battle.net/documentation/world-of-warcraft/game-data-apis APIs for retrieving World of Warcraft region information. Includes an endpoint to get an index of all regions and another to fetch details for a specific region by its ID. ```APIDOC GET /data/wow/region/index Description: Returns an index of regions. Parameters: :region (string, Required): The region of the data to retrieve. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. GET /data/wow/region/{regionId} Description: Returns a region by ID. Parameters: :region (string, Required): The region of the data to retrieve. {regionId} (integer, Required): The ID of the region. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. ``` -------------------------------- ### GET Character Statistics API Source: https://develop.battle.net/documentation/world-of-warcraft/profile-apis Retrieves a statistics summary for a World of Warcraft character. Requires realm slug and character name. Supports locale for localized data. ```APIDOC GET /profile/wow/character/{realmSlug}/{characterName}/statistics Description: Returns a statistics summary for a character. Parameters: :region (string, Required): The region of the data to retrieve. {realmSlug} (string, Required): The slug of the realm. {characterName} (string, Required): The lowercase name of the character. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. ``` -------------------------------- ### Character Media API Source: https://develop.battle.net/documentation/world-of-warcraft/profile-apis Retrieves a summary of media assets available for a World of Warcraft character, such as avatar renders. Requires region, realm slug, character name, and namespace. ```APIDOC GET Character Media Summary /profile/wow/character/{realmSlug}/{characterName}/character-media Description: Returns a summary of the media assets available for a character (such as an avatar render). Parameters: - :region (string, Required): The region of the data to retrieve. - {realmSlug} (string, Required): The slug of the realm. - {characterName} (string, Required): The lowercase name of the character. - namespace (string, Required): The namespace to use to locate this document. - locale (string): The locale to reflect in localized data. ``` -------------------------------- ### World of Warcraft Pet API Source: https://develop.battle.net/documentation/world-of-warcraft/game-data-apis Provides access to World of Warcraft battle pet data, including indexes, individual pet details, media, and pet abilities. Requires region and namespace. ```APIDOC GET /data/wow/pet/index Returns an index of battle pets. Parameters: :region (string, Required): The region of the data to retrieve. namespace (string, Required): The namespace to use to locate this document. locale (string, Optional): The locale to reflect in localized data. ``` ```APIDOC GET /data/wow/pet/{petId} Returns a battle pet by ID. Parameters: :region (string, Required): The region of the data to retrieve. {petId} (integer, Required): The ID of the pet. namespace (string, Required): The namespace to use to locate this document. locale (string, Optional): The locale to reflect in localized data. ``` ```APIDOC GET /data/wow/media/pet/{petId} Returns media for a battle pet by ID. Parameters: :region (string, Required): The region of the data to retrieve. {petId} (integer, Required): The ID of the pet. namespace (string, Required): The namespace to use to locate this document. locale (string, Optional): The locale to reflect in localized data. ``` ```APIDOC GET /data/wow/pet-ability/index Returns an index of pet abilities. Parameters: :region (string, Required): The region of the data to retrieve. namespace (string, Required): The namespace to use to locate this document. locale (string, Optional): The locale to reflect in localized data. ``` ```APIDOC GET /data/wow/pet-ability/{petAbilityId} Returns a pet ability by ID. Parameters: :region (string, Required): The region of the data to retrieve. {petAbilityId} (integer, Required): The ID of the pet ability. namespace (string, Required): The namespace to use to locate this document. locale (string, Optional): The locale to reflect in localized data. ``` ```APIDOC GET /data/wow/media/pet-ability/{petAbilityId} Returns media for a pet ability by ID. Parameters: :region (string, Required): The region of the data to retrieve. {petAbilityId} (integer, Required): The ID of the pet ability. namespace (string, Required): The namespace to use to locate this document. locale (string, Optional): The locale to reflect in localized data. ``` -------------------------------- ### WoW API Namespace Construction Source: https://develop.battle.net/documentation/world-of-warcraft/guides/namespaces Constructs World of Warcraft API namespaces by combining category types with region identifiers. Namespaces are region-specific and follow a pattern like `category-{region}`. ```APIDOC WoW API Namespace Construction: Category Namespaces: - Static: static-{region} - Dynamic: dynamic-{region} - Profile: profile-{region} Region Identifiers: - North America: us - Europe: eu - Korea: kr - Taiwan: tw - China: cn Namespace Construction Examples: - static-us - dynamic-cn - profile-tw ``` -------------------------------- ### Power Type API Source: https://develop.battle.net/documentation/world-of-warcraft/game-data-apis Provides access to World of Warcraft power type data. Includes an endpoint to get an index of all power types and an endpoint to retrieve a specific power type by its ID. ```APIDOC GET /data/wow/power-type/index Returns an index of power types. Parameters: :region (string, Required): The region of the data to retrieve. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. GET /data/wow/power-type/{powerTypeId} Returns a power type by ID. Parameters: :region (string, Required): The region of the data to retrieve. {powerTypeId} (integer, Required): The ID of the power type. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. ``` -------------------------------- ### GET Character Titles API Source: https://develop.battle.net/documentation/world-of-warcraft/profile-apis Retrieves a summary of titles obtained by a World of Warcraft character. Requires realm slug and character name. Supports locale for localized data. ```APIDOC GET /profile/wow/character/{realmSlug}/{characterName}/titles Description: Returns a summary of titles a character has obtained. Parameters: :region (string, Required): The region of the data to retrieve. {realmSlug} (string, Required): The slug of the realm. {characterName} (string, Required): The lowercase name of the character. namespace (string, Required): The namespace to use to locate this document. locale (string): The locale to reflect in localized data. ``` -------------------------------- ### WoW API Namespace Specification Methods Source: https://develop.battle.net/documentation/world-of-warcraft/guides/namespaces Details the methods for specifying the required namespace in World of Warcraft API requests, either via a request header or a query parameter. ```APIDOC WoW API Namespace Specification: Method 1: Header Format: Battlenet-Namespace: {namespace} Example: Battlenet-Namespace: static-us Method 2: Query Parameter Format: ?namespace={namespace} Example: ?namespace=static-us ```