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 game-related data. Specifically, the "Get War Leagues" operation fetches a list of war leagues available in Clash of Clans. This is useful for scenarios where you want to display or analyze the different war leagues that players or clans can participate in.
Practical examples include:
- Displaying all war leagues in a dashboard.
- Filtering clan or player data based on war league participation.
- Automating reports or alerts related to war league changes or updates.
Properties
| Name | Meaning |
|---|---|
| Pagination | Parameters to control the number of results and pagination markers: |
| - Limit: Maximum number of war leagues to return (minimum 1). | |
| - After: Return only items occurring after this marker (for pagination). | |
| - Before: Return only items occurring before this marker (for pagination). |
Output
The output is a JSON object containing metadata about the API request and the retrieved data:
operation: The name of the executed operation ("getWarLeagues").url: The full URL used for the API request.data: The actual response data from the Clash of Clans API representing the list of war leagues.timestamp: The ISO timestamp when the data was fetched.metadata: Additional metadata including:operationType: Categorizes the operation type as "war".apiVersion: The version of the API used ("v1").processedAt: Timestamp when the data was processed.
If the node encounters an error but is set to continue on failure, it outputs the original input JSON along with the error details.
The node does not output binary data.
Dependencies
- Requires an API key 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 configuration of the API token credential in n8n is necessary.
Troubleshooting
Common issues:
- Invalid or missing API token will cause authentication errors.
- Incorrect pagination parameters may result in empty or partial data.
- Network connectivity issues can cause request failures.
Error messages:
- Authentication errors typically indicate invalid or expired API tokens; ensure the API key is valid and has proper permissions.
- "Operation not supported" error occurs if an unsupported operation value is provided.
- HTTP request errors may include rate limiting or server errors; check API usage limits and retry policies.
Resolutions:
- Verify and update the API token credential.
- Adjust pagination parameters carefully to match expected data ranges.
- Use the node's "Continue On Fail" option to handle intermittent errors gracefully.
Links and References
- Official Clash of Clans API documentation: https://developer.clashofclans.com/
- n8n HTTP Request helper documentation: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httpRequest/