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

403 Forbidden accessing Zotero API #12

Open
bjg83 opened this issue Jan 9, 2025 · 0 comments
Open

403 Forbidden accessing Zotero API #12

bjg83 opened this issue Jan 9, 2025 · 0 comments

Comments

@bjg83
Copy link

bjg83 commented Jan 9, 2025

My last successful sync was a week ago.

Running the local version of Zotero2Readwise, I can see an error accessing my API:

Client error '400 Bad Request' for url 'https://api.zotero.org/users/[XXXXX]/items?locale=en-US&itemType=%7B%27annotation%27%7D&since=0&format=json&limit=100'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "run.py", line 73, in
zt2rw.run()
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/zotero2readwise/zt2rw.py", line 53, in run
zot_annots_notes = self.get_all_zotero_items()
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/zotero2readwise/zt2rw.py", line 42, in get_all_zotero_items
items.extend(self.retrieve_all("annotation", self.since))
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/zotero2readwise/zt2rw.py", line 82, in retrieve_all
query = self.zotero_client.items(itemType={item_type}, since=since)
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyzotero/zotero.py", line 167, in wrapped_f
retrieved = self._retrieve_data(func(self, *args))
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyzotero/zotero.py", line 460, in _retrieve_data
merged_params = params | self.url_params
TypeError: unsupported operand type(s) for |: 'dict' and 'dict'

[XXXXX removed user ID here]

I see the same error text after 'the above exception was the direct cause...' in the Github error console.

I can access my web library fine. So I'm not sure why there's an API error.

I also tried generating a new API key and ran using it. I got the same response.

Any ideas? Has anyone else reported this? Is it an API error? Or might Zotero have blocked my API access?

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

No branches or pull requests

1 participant