google-bard-api icon indicating copy to clipboard operation
google-bard-api copied to clipboard

Cookies and Auth_Key

Open elbiozard opened this issue 1 year ago • 5 comments

Hello, is it still working? I can't find the AUTH_KEY in Cookies

elbiozard avatar May 11 '23 14:05 elbiozard

@elbiozard I've just removed that check and rebuild the image just comment from 16 -> 21 line and you should have it working in main.py I guess he is using that to check if from a third party service or something

izdrail avatar May 12 '23 10:05 izdrail

not working am using these: __Secure-1PSID SID

hussainwali74 avatar May 12 '23 17:05 hussainwali74

I've told you you need to comment or remove the lines and the post to /ask { 'session_id': "THE __SECURE-1PSID", "message": "Your bard question" }

izdrail avatar May 12 '23 18:05 izdrail

Hello, is it still working? I can't find the AUTH_KEY in Cookies

Hello! I noticed that the attribute AUTH_KEY, which has been renamed to USER_AUTH_KEY, is causing some confusion for people, and I would like to clarify its purpose. The value of USER_AUTH_KEY is essential for ensuring that your API endpoint has at least some minimal protection and is not directly linked to Bard. Initially, we required this parameter for all API requests, but now USER_AUTH_KEY is an optional parameter.

To send a POST request to the API, you will need to include the session ID in the request body along with the message prompt. The session ID is the value of the __SECURE-1PSID cookie, which you can retrieve from the user's browser.

Therefore, you can update this repository to reflect the new changes.

ra83205 avatar May 12 '23 19:05 ra83205

you should have the session_ID server side, not client side. its dangerous to have it client side.

raymerjacque avatar May 13 '23 18:05 raymerjacque