Skip to content

Commit 30cd60d

Browse files
authored
Document Browserless Authentication
1 parent 4695074 commit 30cd60d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,18 @@ Go CLI to fuels a Telegram bot that lets you interact with [ChatGPT](https://ope
66

77
## Installation
88

9-
Download the file corresponding to your OS in the [releases page](https://github.com/m1guelpf/chatgpt-telegram/releases/latest). After you extract it, copy `env.example` to `.env` and fill in your Bot's details (you'll need your bot token, which you can find [here](https://core.telegram.org/bots/tutorial#obtain-your-bot-token), and optionally your telegram id, which you can find by DMing @userinfobot on Telegram.
9+
Download the file corresponding to your OS in the [releases page](https://github.com/m1guelpf/chatgpt-telegram/releases/latest). After you extract it, copy `env.example` to `.env` and fill in your Bot's details (you'll need your bot token, which you can find [here](https://core.telegram.org/bots/tutorial#obtain-your-bot-token), and optionally your telegram id, which you can find by DMing `@userinfobot` on Telegram.
1010

1111
## Usage
1212

1313
Run the `chatgpt-telegram` binary!
1414

15+
## Browserless Authentication
16+
17+
By default, the program will launch a browser for you to sign into your account. If for whatever reason this isn't possible (compatibility issues, running on a server without a screen, etc.), you can manually provide your cookie.
18+
19+
To do this, first sign into ChatGPT on your browser, then open the Developer Tools, go to the Cookies section in the Application tab, and copy the value of the `__Secure-next-auth.session-token` cookie. Then, create a JSON file in your config dir (`/Users/[username]/Library/Application Support/chatgpt.json` in macOS, `C:\Users\[username]\AppData\Roaming\chatgpt.json` in Windows, `~/.config/chatgpt.json` in Linux), and write your cookie in the following format: `{ "openaisession": "YOUR_COOKIE_HERE" }`.
20+
1521
## License
1622

1723
This repository is licensed under the [MIT License](LICENSE).

0 commit comments

Comments
 (0)