Skip to content

Error: Invalid app_name is specified #51

Description

@BohdanchukVL

using latest analytics npm package

"@telegram-apps/analytics": "^1.4.3"

But after deploying, analytics initialization fails with the error “Invalid app_name is specified.”

import telegramAnalytics from '@telegram-apps/analytics';

if (typeof window !== 'undefined') {
  telegramAnalytics.init({
    token: process.env.NEXT_PUBLIC_TELEGRAM_ANALYTICS_TOKEN,
    appName: process.env.NEXT_PUBLIC_TELEGRAM_ANALYTICS_IDENTIFIER,
  });
}

I’ve tried recreating the app in @DataChief_bot (both with and without the underscore) and even swapped the SDK token with the API token (which only changes the error to “Invalid token.”).
All data prints correctly in the console, so I’m sure there aren’t any extra whitespace characters or symbols. I just can’t figure out what else I can try.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions