Skip to main content

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())

Metadata

Release files for clashapi 1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clashapi 1.4
File Size Uploaded
clashapi-1.4.tar.gz 2.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clashapi 1.4
File Interpreter ABI Platform
clashapi-1.4-py3-none-any.whl Python 3 none any Details

Total release size: 4.7 kB

Release files / clashapi-1.4.tar.gz

Download URL clashapi-1.4.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8ee2c74ed2efb8a73a45244f5d65a055398d67ab5bd1094c9f1883c6c051bb52
BLAKE2b-256 checksum
How to use checksums
1513bed99062778f6113cec1b277074d84463e56a1d204828c94b63dda68c021
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / clashapi-1.4-py3-none-any.whl

Download URL clashapi-1.4-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0348045a9a68e00303efdf8e3957ab036e1d2bedd7fae0a2d667db66d0feb5a
BLAKE2b-256 checksum
How to use checksums
9715b567770b3a22ae3731b6757b343f2ecf91c07101ad51edd66e37812c4901
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release history Release notifications | RSS feed

This release

1.4 This release

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page