Skip to main content

Update IP address of Clash of Clans and/or Clash Royale API keys with token fetching

Project description

ClashAPI

Using your developer account's login email and password, update the IP address of all your existing Clash of Clans and/or Clash Royale API keys to the current one, and obtain their tokens.

Getting Started

Installing

pip install clashapi

Usage

import clashapi

# Clash of Clans
tokens = clashapi.coc("email", "password")

# Clash Royale
tokens = clashapi.cr("email", "password")

# tokens is a list of api key token strings that you can now use to access the COC/CR APIs

Quick Example

import requests
import clashapi
tokens = clashapi.coc("email", "password")

response = requests.get(url="https://api.clashofclans.com/v1/clans/%23208GJG2J", headers={"Accept": "application/json", "authorization": f"Bearer {tokens[0]}"})
print(response.json())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clashapi-1.2.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

clashapi-1.2-py3-none-any.whl (2.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page