Coder Social home page Coder Social logo

UnauthorizedRequest about bingchat HOT 8 OPEN

hswlab avatar hswlab commented on July 28, 2024
UnauthorizedRequest

from bingchat.

Comments (8)

hswlab avatar hswlab commented on July 28, 2024

I finally figured it out. Bing no longer sends the signature in the response content, but in the response header inside X-Sydney-EncryptedConversationSignature. I now use my own solution to communicate with Bing, but the communication principle is more or less the same as with the Bing API here, with the modifications for the signature the Bing API should work again. At least I already could test it successfully in my implementation. :)

from bingchat.

neon-sunset avatar neon-sunset commented on July 28, 2024

@hswlab Thank you, noted this for work once I'll get to next pass of RE and fixes! (currently busy with another project)

from bingchat.

gunpal5 avatar gunpal5 commented on July 28, 2024

@neon-sunset I just added a pull request #41

from bingchat.

chinazhaoht avatar chinazhaoht commented on July 28, 2024

@hswlab I already know how to obtain a signature, but how should I use it in new communication methods?

from bingchat.

hswlab avatar hswlab commented on July 28, 2024

@chinazhaoht For websocket request with ChatHub, this string is currently set in the URL parameter of sec_access_token.
wss://sydney.bing.com/sydney/ChatHub?sec_access_token=TheSignature

If you use the Bing API, you have to wait until the code in the API is customized. @gunpal5 seems to have already an update for this issue. :)

from bingchat.

chinazhaoht avatar chinazhaoht commented on July 28, 2024

I used the signature in the X-Sydney-Encryptedconversationsignature header from the create conversation response, URL-encoded it, and passed it as the sec_access_token to the chathub interface, but the chathub still returns "unauthorized request" and "chathub not authorized".

from bingchat.

gunpal5 avatar gunpal5 commented on July 28, 2024

@chinazhaoht save your time and use this PR: #41

from bingchat.

chinazhaoht avatar chinazhaoht commented on July 28, 2024

@gunpal5 Thank you, I have already solved this problem.

from bingchat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.