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-related data. Specifically, the "Get Player Upcoming Chests" operation fetches information about the upcoming chests a player will receive in the game. This is useful for players or clan managers who want to track and plan around the rewards a player will get next.

Practical scenarios include:

  • Monitoring a player's upcoming rewards to optimize gameplay strategy.
  • Automating notifications or reports about chest availability.
  • Integrating player chest data into clan management dashboards.

Properties

Name Meaning
Player Tag The unique identifier of the player whose upcoming chests you want to retrieve. Must start with #.

Output

The output JSON contains detailed information about the player's upcoming chests as returned by the Clash of Clans API endpoint /players/{playerTag}/upcomingchests. The structure typically includes an array of chest objects describing the type, unlock time, and other relevant details of each upcoming chest.

Example output structure (simplified):

{
  "items": [
    {
      "name": "Silver Chest",
      "unlockTime": "2024-06-01T12:00:00Z",
      "index": 1,
      ...
    },
    {
      "name": "Gold Chest",
      "unlockTime": "2024-06-02T12:00:00Z",
      "index": 2,
      ...
    }
  ]
}

No binary data is output by this operation.

Dependencies

  • Requires an API key credential for the Clash of Clans API.
  • The node makes HTTP requests to the official Clash of Clans API at https://api.clashofclans.com/v1.
  • Proper API authentication token must be configured in n8n credentials for this node to function.

Troubleshooting

  • Invalid Player Tag: If the player tag does not start with # or is malformed, the API will return an error. Ensure the player tag is correctly formatted.
  • Authentication Errors: Missing or invalid API tokens will cause authorization failures. Verify that the API key credential is correctly set up.
  • Rate Limits: The Clash of Clans API enforces rate limits. Excessive requests may result in temporary blocking. Implement retry logic or reduce request frequency if needed.
  • Network Issues: Connectivity problems can cause request failures. Check network access and proxy settings if applicable.
  • Operation Not Supported: If the operation parameter is incorrect or unsupported, the node throws an error indicating the operation is not supported.

Links and References

Discussion