Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

提示:error request preauth code #4

Open
GitHubChrisChen8035 opened this issue Jan 29, 2024 · 0 comments
Open

提示:error request preauth code #4

GitHubChrisChen8035 opened this issue Jan 29, 2024 · 0 comments

Comments

@GitHubChrisChen8035
Copy link

GitHubChrisChen8035 commented Jan 29, 2024

image

用浏览器能访问openai,网络没问题,下面是main文件

package main
import (
"fmt"
"github.com/fireinrain/opaitokens"
)
func main() {
email := "account"
password := "passwd"

tokens := opaitokens.NewOpaiTokens(email, password, false)
token := tokens.FetchToken()
fmt.Printf("token info: %v\n", token)
accessToken := token.OpenaiToken.AccessToken
fmt.Printf("I am using access token: %v \n", accessToken)

token = tokens.RefreshToken()
fmt.Printf("token info again: %v\n", token)
accessToken = token.RefreshedToken.AccessToken
fmt.Println("I am using refresh token: ", accessToken)

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant