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

ChatGPT failed to refresh auth token: Exception: Failed to refresh access token, 403 #7

Open
HazemElgohary opened this issue Dec 27, 2022 · 9 comments

Comments

@HazemElgohary
Copy link

No description provided.

@rudolfsrijkuris
Copy link

rudolfsrijkuris commented Dec 27, 2022

https://github.com/DiamondLionLV/flutter_chatgpt_api Try adding this package to your pubspec.yaml and then change your initialization code to this:

_api = ChatGPTApi(
      sessionToken: SESSION_TOKEN,
      clearanceToken: CLEARANCE_TOKEN,
      userAgent:
          'your user agent',
    );

You can find user agent at Dev Tools -> Network -> Headers

For example mine is Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15

The only issue is that you will still get Exception rate limited error which hasn't been solved yet.

@ngjunya
Copy link

ngjunya commented Dec 27, 2022

@DiamondLionLV I still get the 403 refresh access token error despite I added your package to pubspec.yaml file and added user-agent on the initialisation code.

@RivaanRanawat
Copy link

Facing the same issue. I inspected a bit and it seems the NPM version of ChatGPT api faced the same issue 2 weeks ago.
You can learn more about it here - transitive-bullshit/agentic#96

@wal33d006
Copy link

wal33d006 commented Dec 29, 2022

Facing the same issue. I inspected a bit and it seems the NPM version of ChatGPT api faced the same issue 2 weeks ago. You can learn more about it here - transitive-bullshit/chatgpt-api#96

Is anyone able to run the package successfully in Flutter? I see this specific issue on transitive-bullshit is closed now.
I am still getting the refresh auth token error.

@wal33d006
Copy link

https://github.com/DiamondLionLV/flutter_chatgpt_api Try adding this package to your pubspec.yaml and then change your initialization code to this:

_api = ChatGPTApi(
      sessionToken: SESSION_TOKEN,
      clearanceToken: CLEARANCE_TOKEN,
      userAgent:
          'your user agent',
    );

You can find user agent at Dev Tools -> Network -> Headers

For example mine is Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15

The only issue is that you will still get Exception rate limited error which hasn't been solved yet.

This gives a 403 as mentioned by @ngjunya

@DanielMohammadii
Copy link

There is an issue with Tokens, @DiamondLionLV ,

@adityaAntino
Copy link

adityaAntino commented Jan 4, 2023

Facing the same issue:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: ChatGPT failed to refresh auth token: Exception: Failed to refresh access token.
HELP HELP HELP HELP HELP
We are excited to integrate OPENAI in flutter apps
Also ,
var newMessage = await _api.sendMessage(
input,
conversationId: _conversationId,
parentMessageId: _parentMessageId,
);

__conversationId & parentMessageId is null in the documentation example

@adityaAntino
Copy link

Here is a link to flutter ChatGPT Application Repository for reference
https://github.com/ngjunya/flutter_chatgpt_example

@rahul-mobilecoderz
Copy link

still getting the same error . Issues with token with session token and clearance token . I made a demo project like this https://github.com/ngjunya/flutter_chatgpt_example. It is working fine .

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

8 participants