In questa guida composta da 3 parti andremo a vedere:
- Come creare un bot telegram, e ottenere accesso all’API di Telegram [QUESTA LEZIONE]
- Come scrivere il nostro bot in PHP, e fargli gestire i messaggi e i file [CLICCA QUA]
- Dove hostare il nostro bot gratis. [CLICCA QUA]
Partiamo con la prima parte.
Come creare un bot telegram, e ottenere accesso all’API di Telegram
Questo processo è abbastanza semplice.
Step 1
Apriamo l’app di telegram e contattiamo @BotFather. Schiacciamo START se non l’abbiamo già fatto.
Utente: /start
You can control me by sending these commands:
I can help you create and manage Telegram bots. If you’re new to the Bot API, please see the manual (https://core.telegram.org/bots).
You can control me by sending these commands:
/newbot – create a new bot
/mybots – edit your bots [beta]
…
STEP 2
Ora, scriviamo /newbot per creare un nuovo bot. Completiamo il wizard di installazione.
Ci verranno chiesti:
- Il nome del bot
- L’username del bot.
BotFather vi darà un token che potrete usare per accedere all’API di telegram.
Passate alla lezione 2 per la seconda parte della guida!