Forbidden (403) message when using API

I'm getting a 403 (or 400) "forbidden" message when I try to access my API:

Client error '400 Bad Request' for url 'https://api.zotero.org/users/[XXXXX]/items?locale=en-US&itemType={'annotation'}&since=0&format=json&limit=100'

I can provide my user number instead of XXXXX if helpful. But I wondered if this was a broader problem? Or if I've been blocked etc.

Thanks
  • edited yesterday at 3:37am
    I don't think your library is public and you're not include an API key in the above, so I'm guessing that's what you're seeing, but beyond that you should post API questions (with some more detail on what you're trying to do and in what context you're making the requests -- browser, curl, something else) to the zotero-dev google group.
  • Thanks. I'm using the API to extract Zotero annotations to upload to Readwise. Using this https://github.com/e-alizadeh/Zotero2Readwise
  • Basically when I run python for the Zotero2Readwise script, I get this result.

    It was working fine until last week. It hasn't run successfully since then.
  • You'll want to troubleshoot that with the script/tool maintainer. The API works fine.

    FWIW, the call should be itemType=annotation, not {'annotation'}, I'm assuming there's some missing data type conversion in the script.
Sign In or Register to comment.