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 detailed information about various game entities. Specifically, the "Get Capital District Info" operation fetches detailed data about a specific capital district within the game, identified by its unique Capital District ID. This is useful for players or analysts who want to obtain up-to-date information on particular capital districts such as Barbarian Camp (ID 70000000) and others.
Practical examples include:
- Retrieving stats or details about a capital district to analyze its features or status.
- Integrating Clash of Clans capital district data into dashboards or reports.
- Automating monitoring of capital districts for clan management or competitive analysis.
Properties
| Name | Meaning |
|---|---|
| Capital District ID | The unique identifier of the capital district to retrieve information for. Examples: 70000000 (Barbarian Camp), etc. |
Output
The node outputs JSON data containing the response from the Clash of Clans API for the requested capital district. The output structure includes:
operation: The name of the executed operation (getCapitalDistrictInfo).url: The full API endpoint URL used for the request.data: The detailed JSON object returned by the Clash of Clans API representing the capital district information.timestamp: The ISO timestamp when the data was processed.metadata: Additional metadata including:operationType: Categorization of the operation type (here it will be"general").apiVersion: The version of the API used (v1).processedAt: Timestamp of processing.
No binary data is output by this operation.
Example output snippet (simplified):
{
"operation": "getCapitalDistrictInfo",
"url": "https://api.clashofclans.com/v1/capitaldistricts/70000000",
"data": {
// Detailed capital district info here
},
"timestamp": "2024-06-01T12:00:00.000Z",
"metadata": {
"operationType": "general",
"apiVersion": "v1",
"processedAt": "2024-06-01T12:00:00.000Z"
}
}
Dependencies
- Requires an active Clash of Clans API key credential configured in n8n.
- The node makes HTTP requests to the official Clash of Clans API endpoint at
https://api.clashofclans.com/v1. - Proper API authentication via Bearer token is mandatory.
Troubleshooting
- Invalid Capital District ID: If the provided ID does not exist or is malformed, the API may return a 404 error. Verify the ID is correct and corresponds to a valid capital district.
- Authentication Errors: Missing or invalid API token will cause authorization failures. Ensure the API key credential is correctly set up and has necessary permissions.
- Rate Limits: The Clash of Clans API enforces rate limits. Excessive requests may result in throttling or temporary blocking. Implement retries or delays if needed.
- Network Issues: Connectivity problems can cause request failures. Check network access and proxy settings if applicable.
- Unexpected API Changes: If the API changes, the node might fail or return unexpected data. Keep the node and credentials updated accordingly.
Links and References
- Official Clash of Clans API documentation: https://developer.clashofclans.com/
- Clash of Clans Capital Districts API endpoint reference: https://developer.clashofclans.com/#/documentation#capital-districts
- n8n documentation on creating and using API credentials: https://docs.n8n.io/credentials/overview/