Actions24
- Get Capital District Info
- Get Clan
- Get Clan Capital Info
- Get Clan Capital Raid Log
- Get Clan Members
- Get Clan Rankings
- Get Clan War Log
- Get Current War
- Get CWL Group
- Get CWL War
- Get League Info
- Get League Season Rankings
- Get League Seasons
- Get Location Info
- Get Location Rankings
- Get Locations
- Get Player
- Get Player Achievement Progress
- Get Player Battle Log
- Get Player Rankings
- Get Player Upcoming Chests
- Get War Leagues
- Search Clans
- Verify Player Token
Overview
This node integrates with the Clash of Clans API to retrieve various types of game data. Specifically, the "Get Locations" operation fetches a list of locations available in Clash of Clans. This can be useful for applications that need to display or process location-based rankings, clan information, or player statistics filtered by geographic or regional areas.
Practical examples include:
- Displaying all available locations to users for filtering leaderboards.
- Using location IDs obtained here to query rankings or other location-specific data.
- Building dashboards or reports segmented by location.
Properties
| Name | Meaning |
|---|---|
| Pagination | Parameters to control paging through results: - Limit: Maximum number of results to return. - After: Return only items occurring after this marker. - Before: Return only items occurring before this marker. |
Output
The output is an array of JSON objects, each containing the following structure:
{
"operation": "getLocations",
"url": "https://api.clashofclans.com/v1/locations?limit=50",
"data": { /* API response JSON object with locations list */ },
"timestamp": "2024-06-xxTxx:xx:xx.xxxZ",
"metadata": {
"operationType": "discovery",
"apiVersion": "v1",
"processedAt": "2024-06-xxTxx:xx:xx.xxxZ"
}
}
- The
datafield contains the raw JSON response from the Clash of Clans API for locations. - No binary data is output by this operation.
Dependencies
- Requires an API token credential for the Clash of Clans API.
- The node makes HTTP requests to the official Clash of Clans API endpoint (
https://api.clashofclans.com/v1). - Proper API authentication must be configured in n8n credentials.
Troubleshooting
Common issues:
- Invalid or missing API token will cause authentication errors.
- Exceeding API rate limits may result in throttling or error responses.
- Incorrect pagination parameters (e.g., invalid markers) might return empty or partial results.
Error messages:
"Operation "getLocations" not supported": Indicates a misconfiguration or unsupported operation selection.- HTTP errors such as 401 Unauthorized or 403 Forbidden suggest issues with API credentials.
- Network errors or timeouts indicate connectivity problems.
Resolutions:
- Verify and update the API token credential.
- Adjust pagination parameters carefully.
- Check network connectivity and API status.
Links and References
- Official Clash of Clans API documentation: https://developer.clashofclans.com/#/documentation
- n8n HTTP Request node documentation (for understanding underlying requests): https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/