Giter Site home page Giter Site logo

marsidev / get-sc-key Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 179 KB

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.

Home Page: https://get-sc-key.vercel.app

JavaScript 100.00%
clash-royale clash-royale-api brawl-stars brawl-stars-api clash-of-clans clash-of-clans-api supercell supercell-games api-key

get-sc-key's Introduction

What is this?

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.

Why?

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.

How to use it?

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

Run locally

  • $ npm run install
  • $ npm run start
  • Then you can make your requests to https://localhost:1234

How it works?

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.

Optional parameters

whitelist

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"
  ]
}

fixedIp

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"
}

Contributing

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.

get-sc-key's People

Contributors

marsidev avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.