Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Exception: SNlM0e value not found in response. Check __Secure-1PSID value. #118

Closed
mikey-joyce opened this issue Jul 17, 2023 · 5 comments
Closed

Comments

@mikey-joyce
Copy link

I have this error when trying to make a request. I have checked the __Seecure-1PSID value and it is correct. I know that the Bard developers updated Bard recently, when I tried to log in on my browser it prompted me with a captcha to make sure I wasn't a robot. Will this API be screwed because of this?

@dsdanielpark
Copy link
Owner

dsdanielpark commented Jul 17, 2023

Due to recent updates, I am unable to provide accurate answers. There are various situations occurring with functionalities that are not supported in my country and specific to individual accounts. However, if you have entered the correct values, please try restarting your browser or clearing your cookies. Alternatively, you can refer to https://github.com/dsdanielpark/Bard-API#auto-cookie-bard and try using the following code.

Please close all windows and try calling the following method while logged in to your Chrome Incognito browser.

from bardapi import Bard

bard = Bard(token_from_browser=True)
res = bard.get_answer("Do you like cookies?")
print(res)

@mattbarron
Copy link

I was having the same issue. Someone in a previous thread suggested it had something to do with being logged into multiple google accounts and to try an incognito window, logging in and getting the cookie value from there. That worked for me.

@sudipkumarbhattacharya
Copy link

Facing same issue

@thewh1teagle
Copy link
Contributor

@sudipkumarbhattacharya
Please try to use bard first from your browser, and then copy the cookie value and try again from python
If it doesn't work, sign out from all google accounts in your computer, and then sign in to bard from google chrome
after you finish, update bard api library as follow:

pip3 install -U bardapi

And then run this code as is:

from bardapi import Bard

bard = Bard(token_from_browser=True)
res = bard.get_answer("Do you like cookies?")
print(res)

@mikey-joyce
Copy link
Author

The solution for me was the refresh the cookies in my browser.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants