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.4.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clashapi-1.4-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file clashapi-1.4.tar.gz.

File metadata

  • Download URL: clashapi-1.4.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for clashapi-1.4.tar.gz
Algorithm Hash digest
SHA256 8ee2c74ed2efb8a73a45244f5d65a055398d67ab5bd1094c9f1883c6c051bb52
MD5 3a27707d4c8713b6c85f3d8bc6272c35
BLAKE2b-256 1513bed99062778f6113cec1b277074d84463e56a1d204828c94b63dda68c021

See more details on using hashes here.

File details

Details for the file clashapi-1.4-py3-none-any.whl.

File metadata

  • Download URL: clashapi-1.4-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for clashapi-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c0348045a9a68e00303efdf8e3957ab036e1d2bedd7fae0a2d667db66d0feb5a
MD5 8f9f8ed46dce0632f9cecf2f9e0a31bb
BLAKE2b-256 9715b567770b3a22ae3731b6757b343f2ecf91c07101ad51edd66e37812c4901

See more details on using hashes here.

Supported by

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