- Go to @BotFather chat in telegram
- /start
- /newbot
- Copy the token and save it in .env under TELEGRAM_TOKEN
- use ngrok for local env or some hosting provider like AWS EC2.
- Login in OpenAi's ChatGPT
- Open Developer Tools
- Go to application
- Go to cookies
- Copy the value of __Secure-next-auth.session-token and save it in .env under OPEN_AI_SESSION_TOKEN
1. git clone https://github.com/himanshusr/chatGPT_telegram_nodejs.git
2. cd chatgpt_telegram_nodejs
3. npm install
4. cp .env.sample .env
5. npm run dev
MIT