Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion internal/cli/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ and tg will ask for them here.`
}
}
if _, err := config.LoadCredentials(); errors.Is(err, config.ErrNoCredentials) && os.Getenv("TG_TEST_DC") == "" {
fmt.Fprintln(os.Stderr, "Telegram API credentials are needed once. Create them at https://my.telegram.org/apps")
fmt.Fprint(os.Stderr, `Telegram needs an API ID and hash for tg, once.
1. Open https://my.telegram.org/apps and log in with your phone number
2. Fill in any app title and short name, platform "Desktop"
3. Copy "App api_id" and "App api_hash" below
`)
id, err := p.ask(ctx, "API ID", "")
if err != nil {
return err
Expand Down
Loading