web access (HTML dump...)

trying to figure out how to use a URL to get a dump of data.
I tried this:
https://api.zotero.org/users/{USER_ID}/items?format=json
with my user ID (from security page: "Your user ID for use in API calls is xxx".
My library security is set to:
The response I get is "Forbidden".
I do not have the Public attribute set on the library, as that seems too liberal - "anyone visiting Zotero can see your library".
I did create an API key, but did not see how to use that in a browser URL for access.
??
  • It's an API. It's not something you're meant to use through your browser.

    You can use the key query parameter, but you shouldn't, since it will log your API key in your browser history. Use curl or similar and the Zotero-API-Key header.

    Please post further API questions on zotero-dev, not here, but note that we can't provide general programming advice — you'll need to do your own research for that.
  • Thank you.
    I found an example and discussion of this on reddit, and there a sample was given, that was browser based.

    https://api.zotero.org/groups/2352922/items?limit=10&start=0
    → will result in Zotero API JSON.

    This is what I wanted to do to get my data.
    Yes, I will move this to the other forum.
  • That's a public group. Your library is not. I linked to documentation above that explains how to authenticate to access private data.
  • Thank you.
    I added the "key=" to the URI as I thought your reference indicated, but get "The page you requested could not be found.",
    am I guessing wrong about the format?
    https://api.zotero.org/users/11111/key=aaaaa/items?limit=10&start=0
    I'll post this in the Google group for zotero-dev.
  • Again, we can't provide basic technical instruction here. If you don't know what a URL query parameter is, 1) Google it or ask ChatGPT and 2) the web API may not be the right tool for you.
Sign In or Register to comment.