Download attached PDF using API
I am trying to download an attached PDF file from Zotero storage using the API and curl, but the file won't download as expected. The file can be accessed through the web interface, I can retrieve the attachment information ("GET /users/USER-ID/items/ITEM-KEY"), but when I try to access the actual file ("GET /users/USER-ID/items/ITEM-KEY/file", following instructions here https://www.zotero.org/support/dev/web_api/v3/file_upload#ii_download_the_existing_file) it just returns a blank result (no error message).
This is the curl command (using Ubuntu):
curl -H "Zotero-API-Key:WORKING-API-KEY-HERE" -X GET https://api.zotero.org/groups/GROUP-ID-HERE/items/ITEM-KEY-HERE/file > fulltext.pdf
Are there some additional steps I need to take for this to work?
This is the curl command (using Ubuntu):
curl -H "Zotero-API-Key:WORKING-API-KEY-HERE" -X GET https://api.zotero.org/groups/GROUP-ID-HERE/items/ITEM-KEY-HERE/file > fulltext.pdf
Are there some additional steps I need to take for this to work?
Zotero redirects file downloads to AWS, so you need to use -L in Curl. The rest looks good.