ChatGPT.Net: Exception in chatGpt.CreateClient

My environment: .Net 6.0, Windows 10 I have installed playwright.ps1, referring to issue #1.

My steps: When calling chatGpt.WaitForReady(), the Chromium browser can pop up and display the login page. Then, when calling chatGpt.CreateClient with my SessionToken, the program throws an exception, saying: One or more errors occurred (Response status code does not indicate success: 403 (Forbidden).), while nothing changes in the browser.

I tried to login manually in this pop-up browser, using Google account, but it said: can not log in because this browser or application may not be secure. Not sure if it is as expected. In addition, I’m using VPN to access openai.com. Maybe a proxy problem?

Do you have any suggestions? Thank you

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 28 (16 by maintainers)

Most upvoted comments

I’ve tried it with multiple accounts, but all of them resulted in the same outcome. I also tried using the SessionToken, but didn’t get it to work.

I think I may be doing something wrong. I have attached a video below that shows how I am using it.

First, I start the program, it launches Chromium, gets to the login screen, but then nothing happens. If I try to log in myself, nothing further happens. But when I then restart the program, it is already logged in due to the previous attempt, but then gives me an error message.

After that, I try using the SessionToken. First, I log in to the same Chromium browser and then copy the SessionToken, paste it into the program, but it still gets stuck at the login-screen and then gives me an error.

The exception occurs at “JsonConvert.DeserializeObject(data)” at which point the value of the data variable is “l>”.

unhandled.exception.login.mp4

Is your system language English? It seems that the non English page will get stuck when inputing email, which may be related to the localization.

You may change “Preferred languages” to English, and enable “Clear cookies and site data when you close all windows” on the Chromium settings page. This can prevent automatic login.