Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

300
Views
How can I fetch Clash Of Clans API?

I'm trying to do a discord bot with the clash of clans api. But I get a weird error message. Thanks

Error Message:

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>v1/clans/LYVVC9JQQ</Key><RequestId>67H6BCRSJ41W6K6X</RequestId><HostId>mPhpqkXy1qKENdOnt+CPhfQn4rK0hGhaMxaLq9q21Ehtbs/CMzSgqHy9TA6L7hii0PY9+Lo2rzg=</HostId></Error>

async function getClashofClansAPi() {
    let clashofClansAPI = await fetch(`https://developer.clashofclans.com/v1/clans/LYVVC9JQQ`)
    let cocApi = await clashofClansAPI.text()
    console.log(cocApi)
}
getClashofClansAPi()

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

The API URL is api.clashofclans.com and you are also lacking an API KEY in your authorization header unless you removed it for security purposes

Clash of Clans API uses JSON Web Tokens for authorizing the requests. Tokens are created by developers on My Account page and must be passed in every API request in Authorization HTTP header using Bearer authentication scheme. Correct Authorization header looks like this: "Authorization: Bearer API_TOKEN".

about 4 years ago · Juan Pablo Isaza Report

0

The request url should be https://api.clashofclans.com/v1/clans/%232Q8GRY8LQ

Remember, the hashtag (for example #2PP) should be replaced with %23, Next time, please read Clash of Clans API Documentation correctly.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!