← all repositories
rawandahmad698/PyChatGPT

A Python client that reverse-engineered ChatGPT's front door

An unofficial Python wrapper that automated ChatGPT's web authentication and conversations before an official API existed, now abandoned.

★4.2k stars Python Chat Assistants
PyChatGPT
Not currently ranked — collecting fresh signals.
star history

What it does

PyChatGPT automated interactions with ChatGPT’s unofficial web backend from Python. It managed the full lifecycle: logging in, grabbing and refreshing access tokens, tracking conversation state, and resuming chats across program restarts, all without keeping a browser open.

The interesting bit

The author reverse-engineered OpenAI’s Auth0 flow—complete with JWT state tokens and CSRF guards—using a TLS client to mimic a real user. The README admits the motive was pure curiosity: “No one has been able to do this, and I wanted to see if I could.”

Key highlights

  • Browser-free authentication via a nine-step flow in auth.py
  • Persistent conversation tracking with resumable session IDs
  • Proxy support and automatic token refresh
  • Packaged on PyPI as chatgptpy with a Gradio demo on Hugging Face Spaces
  • Colorized CLI output, because why not?

Caveats

  • Author explicitly states the project is “Not maintained” and “Not Working”
  • Built by reverse-engineering the web API, so it was always going to be fragile

Verdict

A fun archaeological dig if you study authentication bypass or early ChatGPT tooling, but completely non-functional today. Anyone building for production should use OpenAI’s official API instead.

Frequently asked

What is rawandahmad698/PyChatGPT?
An unofficial Python wrapper that automated ChatGPT's web authentication and conversations before an official API existed, now abandoned.
Is PyChatGPT open source?
Yes — rawandahmad698/PyChatGPT is open source, released under the MIT license.
What language is PyChatGPT written in?
rawandahmad698/PyChatGPT is primarily written in Python.
How popular is PyChatGPT?
rawandahmad698/PyChatGPT has 4.2k stars on GitHub.
Where can I find PyChatGPT?
rawandahmad698/PyChatGPT is on GitHub at https://github.com/rawandahmad698/PyChatGPT.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.