// You can skip this step if you have your own access token
const token = await BattleNet.getToken({
region: 'us',
clientId: '<YOUR CLIENT ID>',
clientSecret: '<YOUR CLIENT SECRET>',
})
// initiate WoWAPI instance
const wow = new WoWAPI({
region: 'us',
accessToken: token.access_token,
})
const character = await wow.getCharacter('argent-dawn', 'razzin')
const achievement = await wow.getAchievementById(200)
Required .env
or .env.local
file variables
BNET_CLIENT_ID="id"
BNET_CLIENT_SECRET="secret
yarn build