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.auth()
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-1.0.3.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for OpenAIAuth-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 698af30908368b8a70eb960643858571ff5058eed82960b283480517fcbb3b1a |
|
MD5 | f4dcfb2738023c94365305c1ec24da0a |
|
BLAKE2b-256 | 37e74a97e72d1c0a12b41305e70d0afaa7af06659cc5770336ad48ccba520f61 |