Telegram WebApp Auth icon

Telegram WebApp Auth

Securely validates Telegram WebApp init data

Overview

This node securely validates Telegram WebApp init data. It is useful for scenarios where you need to verify the authenticity and integrity of data received from a Telegram WebApp, ensuring that the data has not been tampered with. For example, it can be used in workflows that require secure user authentication or data validation from Telegram WebApps.

Use Case Examples

  1. Validating Telegram WebApp init data to confirm user identity before proceeding with further workflow steps.
  2. Checking the integrity of data received from a Telegram WebApp to prevent fraudulent or tampered data processing.

Properties

Name Meaning
Init Data The init data string from the Telegram WebApp that needs to be validated.
Add Separat Failed Output Whether to add a separate output for failed validation results, allowing separate handling of valid and invalid data.

Output

JSON

  • isValid - Indicates whether the init data is valid (true) or invalid (false).
  • data - The parsed init data object when validation is successful.
  • reason - The error message or reason for validation failure when the init data is invalid.

Dependencies

  • Requires a Telegram API credential with an access token for validation.

Troubleshooting

  • If the node outputs invalid data with a reason, it usually means the init data string is malformed or the validation failed due to incorrect or expired access token.
  • Ensure the Telegram API credential is correctly configured with a valid access token to avoid authentication errors.
  • If using the separate failed output option, make sure to handle both outputs in the workflow to properly process valid and invalid data.

Discussion