1n9i9c7om / ClashOfClans-API-PHP

PHP wrapper for SuperCell's official ClashOfClans API.
MIT License
34 stars 13 forks source link

Any specific read permissions needed on the CoC side? #2

Closed zachyarid closed 8 years ago

zachyarid commented 8 years ago

So I've gotten my API token from the CoC website (made sure the IP was correct as my server).

For some reason, when I enter my clan tag (#YGJP9RGR), I am returned with a blank page (except the column headers, donation headers, etc) when I access the page. Is there anything on the CoC app that I need to enable to allow the API to access my clan's data? Do I need to the a (Co-)Leader in order for it to work?

zachyarid commented 8 years ago

Actually, I found the error I'm getting. It's giving me an {"reason":"accessDenied","message":"Invalid authorization"} error. I'm going to try to regenerate my API key and see if there was a bug there.

zachyarid commented 8 years ago

Found the issue. For some reason, my server is using one IP address (for the front end, what my domain resolves to) but using another IP to actually make the cURL api call. Strange.... Anyway, it works as promised!

1n9i9c7om commented 8 years ago

Glad to see it works for you!
I should probably include a check for accessDenied, I ran into the same issue when I forgot to change my token.