Blizzard Battle.net Developer Portal Quick Start Guide

API Discussion
Whether you're a new developer or one migrating from our old API portal, the following steps will help you get up and running with minimal fuss. Check out the What's changed? section for important details on how the new Developer Portal handles requests and authorization.

Quick Start
Follow the steps below to begin making API requests.

1. Log in to the Developer Portal or create a Blizzard Account.
2. Create a client on the API Access page.
3. Get your client ID and client secret. Note: Clients may require up to 10 minutes before they can make requests after creation.
4. Make a request. In this example, an application is making a GET /tokenindex request to get the price of a WoW Token.
5. Construct a request URI.
  • Blizzard URI paths follow a standard syntax using this format:
    {region}.api.blizzard.com/{API path}
  • The URI for this request is:
    https://us.api.blizzard.com/data/wow/token/?namespace=dynamic-us
  • 6. Get your access token via the OAuth client credentials flow:
    curl -u {client_id}:{client_secret} -d grant_type=client_credentials url="https://us.battle.net/oauth/token
    7. Finally, make your GET /tokenindex request using that access token:
    curl -H "Authorization: Bearer {access_token}" url="https://us.api.blizzard.com/data/wow/token/?namespace=dynamic-us

    What's changed?
    We've made the following changes in creating the new developer portal.

    Host names have changed
    Requests to the Mashery portal used {region}.api.battle.net. The new developer portal uses {region}.api.blizzard.com.

    Blizzard APIs now use Access tokens
    We no longer use API keys; instead, requests use access tokens acquired via either the OAuth client credentials flow or authorization code flow.

    Expiration time
    Access tokens expire after 24 hours.

    What kind of access token do I need?
    The client credentials flow is used for almost all Blizzard API requests. The authorization code flow currently provides access tokens for the following requests:

  • GET /oauth/userinfo
  • GET /wow/user/characters
  • Where do I submit an access token?
    Access tokens submitted as a query parameter follow this format: https://<request URI>/?access_token={token}
    Access tokens submitted in cURL requests follow this format:
    curl --header "Authorization: Bearer <access_token>" <REST API URL>

    Join the Conversation

    Return to Forum