Clash of Clans icon

Clash of Clans

Comprehensive Clash of Clans API integration with advanced features

Overview

This node integrates with the Clash of Clans API to retrieve various types of game data. Specifically, the "Get Clan Rankings" operation fetches clan rankings filtered by a specified location. This is useful for players, analysts, or community managers who want to track clan performance and standings within different regions or globally.

Practical examples include:

  • Monitoring top clans in a specific country or worldwide.
  • Comparing clan rankings across different locations.
  • Integrating clan ranking data into dashboards or reports for gaming communities.

Properties

Name Meaning
Clan Tag The unique identifier of the clan, starting with #. Required for clan-specific queries.
Location ID The identifier for the geographic location to filter rankings (e.g., 32000006 for Global, 32000007 for USA).

Output

The output JSON contains an object with the following structure:

  • operation: The name of the executed operation (getClanRankings).
  • url: The full API endpoint URL used for the request.
  • data: The raw response data from the Clash of Clans API containing clan rankings information for the specified location and clan tag.
  • timestamp: The ISO timestamp when the data was fetched.
  • metadata: Additional metadata including:
    • operationType: Categorizes the operation type as "clan".
    • apiVersion: The version of the API used ("v1").
    • processedAt: Timestamp indicating when the data was processed.

The node does not output binary data.

Dependencies

  • Requires an API authentication 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 configuration of the API token credential in n8n is necessary for successful requests.

Troubleshooting

  • Common issues:
    • Invalid or missing API token will cause authentication errors.
    • Incorrect clan tag format (must start with #) will result in API errors.
    • Using an invalid or unsupported location ID may return empty or error responses.
  • Error messages:
    • Authentication failures typically indicate problems with the API token; verify the token validity and permissions.
    • "Operation not supported" error occurs if an unsupported operation value is set.
    • HTTP errors from the API (e.g., 404 Not Found) usually mean the clan tag or location ID does not exist or is mistyped.
  • To resolve errors, ensure all required parameters are correctly formatted and the API token is valid.

Links and References

Discussion