brawlstars.js is an API wrapper for Brawl Stars in Javascript. This uses the Official Brawl Stars API to gather data.
- Head to the Official Brawl Stars API.
- Create a new account.
- After creating a account, go to your account.
- Create a new token. Name it anything, put any description, and for the IP, add the IP address where you will be requesting from.
- Hit create token, then click on the token, and your token will show up. This is basically your access key to the API.
- Run in your console
npm install brawlstars.js
- You're done!
const BrawlStars = require("brawlstars.js")
const token = "Your Token"
const client = new BrawlStars.Client(token)
;(async() => {
const player = await client.getPlayer("#PLAYERTAG")
const playerClub = await client.getClub(player.club.tag)
})()