Reputation: 75
For context, I am trying to build a Chrome extension popup that allows users to chat with ChatGPT on any web page and I am struggling to figure out how I can generate the arkose_token
that is required within the request payload for creating GPT-4 conversations.
The endpoint I am trying to call is: https://chat.openai.com/backend-api/conversation
(POST)
I will be using the current ChatGPT web session to authenticate the request and I just need to find a way to pass a valid arkose token, here is an example payload:
{
"action": ... ,
"messages": ... ,
"parent_message_id": ... ,
"model": "gpt-4",
"timezone_offset_min": ... ,
"suggestions": ... ,
"history_and_training_disabled": ... ,
"arkose_token": NEED TO PASS A VALID TOKEN HERE,
"force_paragen": ...
}
I have explored these GitHub repos but I'm not quite sure on how to integrate them into my Chrome extension project:
bda
value, I am not too sure what to do with thisI know this can be done because there are existing extensions that allow you to use your ChatGPT account and chat with the GPT-4 model with no issues, for example: https://chrome.google.com/webstore/detail/harpa-ai-automation-agent/eanggfilgoajaocelnaflolkadkeghjp?hl=en-GB&authuser=1
Has anyone else faced these issues or have any experience with this? I'm unsure of the best workflows/handling of these arkose tokens.
Upvotes: 2
Views: 2860
Reputation: 101
Use this script to generate an arokse_token:
https://github.com/linweiyuan/chatgpt-arkose-token-api
Clone it, install go and run it using go run main.go
. It will create a new http service at the mentioned port.
Go to localhost:port
and click the button. It will display a token.
Upvotes: 2