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

Getting 403 error #10

Closed
dkdevpro opened this issue Dec 12, 2022 · 6 comments · Fixed by #11
Closed

Getting 403 error #10

dkdevpro opened this issue Dec 12, 2022 · 6 comments · Fixed by #11

Comments

@dkdevpro
Copy link

--> POST https://chat.openai.com/backend-api/conversation
Content-Type: application/json
Content-Length: 289
accept: text/event-stream
accept-encoding: gzip, deflate, br
accept-language: en-GB,en-US;q=0.9,en;q=0.8
referer: https://chat.openai.com/chat
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15
Authorization: Bearer
{"action":"next","messages":[{"id":"eb0dd397-ebe9-4b52-8db4-0d077a5d3a5d","role":"user","content":{"content_type":"text","parts":["Hi"]}}],"conversation_id":"9a6c65bb-46af-4a83-9906-9a8db06666ba","parent_message_id":"b4ebadcb-a33a-446d-86ab-eb5ad76f3fd5","model":"text-davinci-002-render"}
--> END POST (289-byte body)
<-- 403 https://chat.openai.com/backend-api/conversation

@pluja
Copy link

pluja commented Dec 12, 2022

Seems like the addition of Cloudlfare has broken all the unofficial APIs

m1guelpf/chatgpt-telegram#69 (comment)

@skydoves
Copy link
Owner

Hey @CodeWithDino @pluja The issue was resolved in the new release. Thanks for reporting!

@dkdevpro
Copy link
Author

@skydoves Thank you for the update. I still face the same issue while run it on the emulator. Do I need to run this app in any specific configuration such devices, OS etc?

com.skydoves.chatgpt I --> POST https://chat.openai.com/backend-api/conversation
com.skydoves.chatgpt I Content-Type: application/json
com.skydoves.chatgpt I Content-Length: 289
com.skydoves.chatgpt I accept: text/event-stream
com.skydoves.chatgpt I accept-encoding: gzip, deflate, br
com.skydoves.chatgpt I accept-language: en-GB,en-US;q=0.9,en;q=0.8
com.skydoves.chatgpt I referer: https://chat.openai.com/chat
com.skydoves.chatgpt I user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
com.skydoves.chatgpt I Cookie: cf_clearance=a_xJ_UxaqvR3BeWnZNzi1hpLmpXg9o.S_mz__qm3zEs-1670915426-0-1-18dc4f28.25e87455.4fdd10c8-160
com.skydoves.chatgpt I Authorization: Bearer
com.skydoves.chatgpt I {"action":"next","messages":[{"id":"e2cb7b2d-0c83-4e0d-bc29-dde655636c73","role":"user","content":{"content_type":"text","parts":["Hi"]}}],"conversation_id":"9e82a950-305a-4579-936f-ac155841e1e4","parent_message_id":"50202887-3c41-4798-bfe0-50103252f293","model":"text-davinci-002-render"}
com.skydoves.chatgpt I --> END POST (289-byte body)
com.skydoves.chatgpt I <-- 403 https://chat.openai.com/backend-api/conversation (115ms)
com.skydoves.chatgpt I date: Tue, 13 Dec 2022 07:41:37 GMT
com.skydoves.chatgpt I content-type: text/html; charset=UTF-8
com.skydoves.chatgpt I cf-chl-bypass: 1
com.skydoves.chatgpt I permissions-policy: accelerometer=(),autoplay=(),camera=(),clipboard-read=(),clipboard-write=(),fullscreen=(),geolocation=(),gyroscope=(),hid=(),interest-cohort=(),magnetometer=(),microphone=(),payment=(),publickey-credentials-get=(),screen-wake-lock=(),serial=(),sync-xhr=(),usb=()
com.skydoves.chatgpt I referrer-policy: same-origin
com.skydoves.chatgpt I x-frame-options: SAMEORIGIN
com.skydoves.chatgpt I cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
com.skydoves.chatgpt I expires: Thu, 01 Jan 1970 00:00:01 GMT
com.skydoves.chatgpt I set-cookie: __cf_bm=8wacDlmmMr3gyYkJbmq1wBY0eI9PgtKbciX.zkGc3ck-1670917297-0-AXxVnFDP1yG6/045NXLSjaLFFYQosxEyWHJU+bU5XtvpLypsLuRwJX0Xsffa/LmVaUc1xNS0Ncgkn5dTp7kiHHw=; path=/; expires=Tue, 13-Dec-22 08:11:37 GMT; domain=.chat.openai.com; HttpOnly; Secure; SameSite=None
com.skydoves.chatgpt I vary: Accept-Encoding
com.skydoves.chatgpt I server: cloudflare
com.skydoves.chatgpt I cf-ray: 778d0ef75f2e6ee6-BOM
com.skydoves.chatgpt I content-encoding: gzip
com.skydoves.chatgpt I alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400

@skydoves
Copy link
Owner

Hey @CodeWithDino, I would recommend you update the project and build again following the new guideline.

Also, I recommend you build after clean the project. Thanks!

@dkdevpro
Copy link
Author

@skydoves I did update the project and followed the new guideline. But I was facing the same issue. I just updated GPT_SESSION and CF_CLEARANCE based on the guideline but it doesn't resolve 403 forbidden error. Pls let me know if you need more details from my end.

@skydoves
Copy link
Owner

Hey, @CodeWithDino I released a new version and it includes the login feature. You can now use the ChatGPT without additional steps. Thanks :)

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

Successfully merging a pull request may close this issue.

3 participants