Node.js client for the unofficial ChatGPT API and unofficial WhatsApp Baileys API.
Make sure you have nodejs installed on your computer.
1. Clone this repo
2. run `npm install`
3. set `SessionToken` in config.json
4. run:
node index.js
or
nodemon index.js
Note
Per the official OpenAI Discord on December 7th, 2022: The ChatGPT servers are currently experiencing "exceptionally high demand," so some requests may slow d(https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503).
This package requires a valid session token from ChatGPT to access it's unofficial REST API.
To get a session token:
- Go to https://chat.openai.com/chat and log in or sign up.
- Open dev tools.
- Open
Application
>Cookies
. - Copy the value for
__Secure-next-auth.session-token
and save it to your config.json file.
After running with node index.js or nodemon index.js in console terminal a qrcode image will appear, scan qrcode with whatsapp application oon your handphone. OoOhh, this is like login whatsapp on whatsapp web.
This package is ESM-only. It supports:
- Node.js >= 16.8