Closed Dima-369 closed 1 year ago
Hi Dima, I currently access it from Singapore which isn’t in the list of supported countries, and it works well. You only need to register once with the VPN of the registered country, after that you can access it from anywhere. Is there any issue you’re facing?
Is there any issue you’re facing?
Yeah, I get this. I added print(lines)
to def get_answer(self,prompt):
to see the error. No idea how to work around this though.
Found old conversations, using the most recent one
['{"error": {"type": "permission_error", "message": "We are unable to serve your request"}}']
I get the same error when using claude.create_new_conversation()
before.
okay, let me look into this! can you let me know which country you are accessing the api from? and when did the issue first happen?
can you let me know which country you are accessing the api from?
Germany.
and when did the issue first happen?
I think I always had issues using this package, I just wanted finally note it down ;)
and are you sure you're copying the whole session key cookie from the browser, because this error sometimes comes because of that. I jut tried accessing the api, and it worked for me, I am also accessing it from a non supported country
I am using this code. Is this incorrect? I inserted ...
in a few places, but did not touch the cookie keys like sessionKey=
.
from claude import Claude
cookie = "intercom-device-id-lupk8zyo=...d1835ed5; __cf_bm=Vp4Tq1sik_Q_YAQ...Ms8k-1695200839-0-AVkRmai4aCd5PD/04v4u6C6g+Y3p...T1ByeuV+26YJUgMmJ/CNrZp4g+2vII9HPavmFCa5nc=; cf_clearance=8qSqujGm...PAswE-1695200841-0-1-754722c6.8446846a.22467d26-0.2.1695200841; sessionKey=sk-ant-sid01-y5...kDUmXTabK3rcg8ZCNoHD_lgcvqjP60E...AAA; intercom-session-lupk8zyo=b1M3NU...zZ2RlWm1BNElieWtTU3VDWmgrMzhkQzV3cGFZNjVRYW...RS3EwaWt4SnM5Zz09--35b234ffa70fa7a2c24...86"
claude = Claude(cookie)
claude.create_new_conversation()
prompt = "php strip string"
response = claude.get_answer(prompt)
print(response)
this is what I did and it is running, checked once again
from claude import Claude
cookie = "sessionKey=sk-...;"
claude = Claude(cookie)
prompt = "Hello, Claude!"
response=claude.get_answer(prompt)
print(response)
try using just the session key maybe, also make sure you have the latest version of the package installed
try using just the session key maybe, also make sure you have the latest version of the package installed
I have the latest version. Just using the session key throws the exact same error. Guess, I'm out of luck since you can't reproduce it. Let's just close this issue then?
are you able to use it online, like from the official claude website?
Yes, I access it via the Opera VPN.
I can try adding some more headers to see if it can be fixed, because usually permission denied is because of a wrong cookie or authentication, as if it was a location issue I would be facing it too. Will let you know if I find anything.
It's quite weird. So claude.create_new_conversation()
works to create new conversations but getting an answer doesn't work.
curl_cffi.requests.errors.RequestsError: Failed to perform, ErrCode: 77, Reason: 'error setting certificate verify locations: CAfile: \Python\Python310\lib\site-packages\curl_cffi\cacert.pem CApath: none'
Claude just added support for many countries, so can check if its working not for you or not?
Claude just added support for many countries, so can check if its working not for you or not?
Hey, cool, that you mention it! I just tested my exact same code above and it works flawlessly in Germany without a VPN now.
Thanks :)
okay perfect I'll close this issue then
That way, I could access this outside the 'supported' countries.