This is an API to generate a fresh API key for Supercell games for your current IP. It supports Clash Royale, Clash of Clans and Brawl Stars.
Those API's has a limitation of one API key per IP and a maximum of 10 API keys per user. This is fine if you are using a single IP, but if you are using multiple IPs, you will need to generate a new API key for each IP.
You can use this API by making a POST request to the following URL https://get-sc-key.vercel.app
adding in the body your user credentials and the game id you want to generate a key for. Example:
{
"game": "clashroyale",
"email": "yourmail",
"password": "yourpassword"
}
Then you will receive a JSON response like this:
{
"name": "Key generated at 8/2/2022 6:19:26 p. m.",
"description": "Key for non-commercial use",
"ipRange": [
"xx.xx.xx.xx"
],
"key": "your_key"
}
Supported game IDs: clashroyale, clashofclans, brawlstars, cr, coc, bs
$ npm run install
$ npm run start
- Then you can make your requests to
https://localhost:1234
This API login into the game developer portal with your credentials, check if exists a key for your IP and if not, delete the first key and generate a new one for your IP. Otherwise, it will return the existing key. The logic is inspired on TheLearneer/supercell-api. The IP is obtained from ipify.
You can send a whitelist array of API key-names to avoid deleting them. Example:
{
"game": "coc",
"email": "yourmail",
"password": "yourpassword",
"whitelist": [
"important-key-1",
"important-key-2"
]
}
You can set a fixed IP to use instead of the current one. Example:
{
"game": "bs",
"email": "yourmail",
"password": "yourpassword",
"fixedIp": "11.22.33.44"
}
Any contributions you make are greatly appreciated. If you have a suggestion that would make this better, please fork the repo and create a Pull Request. You can also simply open an issue.