Skip to content
This repository was archived by the owner on Mar 11, 2023. It is now read-only.

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Brawl Stars API Proxy

This repository is an edited version of brawlstars javascript wrapper.

What & Why was this made?

  • This is an unofficial wrapper of the official brawl stars API with proxy. Many developers don't/can't use brawl stars API due to the fact that it is IP bounded. But this solves their problem.

  • The proxy used here is provided by royaleapi.com. You can read the documentation here.

How to use?

1. Refer the usage page of brawlstars wrapper for more info.

Example Usage:

Simply import the Client class and instantiate it with your API token:

// TypeScript, ESM

import  {  Client  }  from  "Brawl-Stars-API-Proxy";

// CommonJS, Node.js

const  {  Client  }  =  require("Brawl-Stars-API-Proxy");

// Create instance

const  client  =  new  Client("TOKEN",  { 

 cache:  true,  // default is true

 cacheOptions:  undefined  /* options for node-cache, default is undefined. */

});

// Call into functions

client.getPlayer("TAG")

 .then((player)  =>  console.log(player.name))

 .catch((err)  =>  console.error(err));

2. Obtaining API Token & Whitelist IP

You can create an API Token on the official brawl stars developer website.

While creating a "API Token" you will be asked to whitelist IPs, here just simply whitelist 128.128.128.128 IP address:

IP Whitelist

3. Last small thing

Click on "Create Key" and you will get your access token. Now just replace the TOKEN with your access token.

Note: You should always keep your token private. With this you would be able to connect with the API from any IP Address.

Useful Links

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors