OpenAI Authentication Reverse Engineered
Project description
OpenAIAuth
Fetch access tokens for chat.openai.com
Python version
from OpenAIAuth import Auth0
auth = Auth0(email="example@example.com", password="example_password")
access_token = auth.get_access_token()
Go version
package main
import (
"fmt"
"os"
"github.com/acheong08/OpenAIAuth/auth"
)
func main() {
auth := auth.NewAuthenticator(os.Getenv("OPENAI_EMAIL"), os.Getenv("OPENAI_PASSWORD"), os.Getenv("PROXY"))
err := auth.Begin()
if err.Error != nil {
println("Error: " + err.Details)
println("Location: " + err.Location)
println("Status code: " + fmt.Sprint(err.StatusCode))
println("Embedded error: " + err.Error.Error())
return
}
token, err := auth.GetAccessToken()
if err.Error != nil {
println("Error: " + err.Details)
println("Location: " + err.Location)
println("Status code: " + fmt.Sprint(err.StatusCode))
println("Embedded error: " + err.Error.Error())
return
}
fmt.Println(token)
}
Credits
- @linweiyuan
- @rawandahmad698
- @pengzhile
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
OpenAIAuth-3.0.0.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file OpenAIAuth-3.0.0.tar.gz
.
File metadata
- Download URL: OpenAIAuth-3.0.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f52ae9b6285e88ce6cf5823a1edebc6a10c630500359f050800594058dc4109f |
|
MD5 | 6114fe415d66cabdac48265e2dc1a550 |
|
BLAKE2b-256 | 1ba001c339fe5132c3a4d54b0553b0100b6e84c342ae0e1e24b9175ba56a9f68 |
File details
Details for the file OpenAIAuth-3.0.0-py3-none-any.whl
.
File metadata
- Download URL: OpenAIAuth-3.0.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a013dac29099f1000c457e953d8319d5d21186228864290786f2ed386c2500d6 |
|
MD5 | 358527d1a9d6735313bccf3b8457ede8 |
|
BLAKE2b-256 | 356c17f8843d76cfa238fbb0e685d68d3764a019400d5c966bb7e1ef0ab87b46 |