获取ChatGPT的RefreshToken

获取ChatGPT的RefreshToken

💡 原文中文,约500字,阅读约需2分钟。
📝

内容提要

本文介绍了获取ChatGPT的RefreshToken的步骤,包括设置代理、下载openai_token.py、安装依赖、运行脚本生成token.json,并通过浏览器登录以获取refresh_token。

🎯

关键要点

  • 设置http(s)代理:$env:HTTP_PROXY="http://127.0.0.1:10809" $env:HTTPS_PROXY="http://127.0.0.1:10809"
  • 下载仓库的 openai_token.py
  • 安装依赖:pip install requests drission-page click pyinstaller
  • 运行一次 openai_token.py 得到 token.json
  • 填入 devicetoken,运行 openai_token.py -r,拉起浏览器进行登录
  • 登录后在 token.json 写回 refresh_token
➡️

继续阅读