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
Metadata
Release files for OpenAIAuth 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| OpenAIAuth-3.0.0.tar.gz | 5.0 kB | Without provenance | Details for OpenAIAuth-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| OpenAIAuth-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for OpenAIAuth-3.0.0-py3-none-any.whl |
Total release size: 10.1 kB
Release files / OpenAIAuth-3.0.0.tar.gz
| Download URL | OpenAIAuth-3.0.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f52ae9b6285e88ce6cf5823a1edebc6a10c630500359f050800594058dc4109f
|
|
BLAKE2b-256 checksum How to use checksums |
1ba001c339fe5132c3a4d54b0553b0100b6e84c342ae0e1e24b9175ba56a9f68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Release files / OpenAIAuth-3.0.0-py3-none-any.whl
| Download URL | OpenAIAuth-3.0.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a013dac29099f1000c457e953d8319d5d21186228864290786f2ed386c2500d6
|
|
BLAKE2b-256 checksum How to use checksums |
356c17f8843d76cfa238fbb0e685d68d3764a019400d5c966bb7e1ef0ab87b46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Security for OpenAIAuth 3.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.