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 detailed information about various game aspects. Specifically, the "Get League Seasons" operation fetches a list of seasons for a specified league. This is useful for tracking historical or current competitive seasons within a particular league, such as the Legend League or Titan League.

Practical scenarios include:

  • Displaying all past and current seasons of a league for analytics or reporting.
  • Automating updates or notifications based on season changes.
  • Integrating league season data into dashboards or clan management tools.

Properties

Name Meaning
League ID The unique identifier of the league to query seasons for. Examples: 29000022 (Legend League), 29000023 (Titan League).
Pagination Parameters to control the number of results and pagination markers:
- 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 JSON contains an object with the following structure:

{
  "operation": "getLeagueSeasons",
  "url": "https://api.clashofclans.com/v1/leagues/{leagueId}/seasons?limit=...&after=...&before=...",
  "data": { /* API response containing league seasons data */ },
  "timestamp": "ISO timestamp when the request was made",
  "metadata": {
    "operationType": "league",
    "apiVersion": "v1",
    "processedAt": "ISO timestamp when processed"
  }
}
  • The data field holds the raw API response with the list of seasons for the specified league.
  • No binary data output is produced by this operation.

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: https://api.clashofclans.com/v1.
  • Proper API token with permissions to access league season data is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing API token will cause authentication errors.
    • Incorrect or non-existent League ID may result in 404 Not Found or empty responses.
    • Pagination parameters (after, before) must be valid markers returned from previous queries; otherwise, no results or errors may occur.
  • Error messages:

    • "Operation 'getLeagueSeasons' not supported": Indicates a misconfiguration or typo in the operation parameter.
    • HTTP 401 Unauthorized: Check that the API token is correctly set and has required permissions.
    • HTTP 400 Bad Request: Verify that pagination parameters and league IDs are correctly formatted.
  • To resolve errors, ensure credentials are valid, input parameters are correct, and API limits are respected.

Links and References

Discussion