Metadata-Version: 2.1
Name: OpenAIAuth
Version: 1.0.3
Summary: OpenAI Authentication Reverse Engineered
Home-page: https://github.com/acheong08/OpenAIAuth
Author: pengzhile
Author-email: acheong@student.dalat.org
License: MIT
Project-URL: Bug Report, https://github.com/acheong08/OpenAIAuth/issues/new
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown
License-File: LICENSE

# OpenAIAuth
Fetch access tokens for chat.openai.com

## Python version
```py
from OpenAIAuth import Auth0
auth = Auth0(email="example@example.com", password="example_password")
access_token = auth.auth()
```

## Go version
```go
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
