How to download submision files from `OJS` via `REST API`?

How to download submision files from OJS via REST API or by other means?

When I use the entry point /submissions/{submissionId}/files/{submissionFileId} of the REST API I get a JSON with a ‘url’ key like the following

https://domain.org/path/$$$call$$$/api/file/file-api/download-file?submissionFileId=19300&submissionId=8579&stageId=3

This URL is correct and I can request it in a browser to download the file.

But when I use the REST API by adding the token apiToken=****** as follows

https://domain.org/path/$$$call$$$/api/file/file-api/download-file?submissionFileId=19300&submissionId=8579&stageId=3&apiToken=******

I get a response error:

{
    "status":false,
    "content":"The current role does not have access to this operation",
    "elementId":"0",
    "events":null
}

Hello @me-kell
have you solved the problem? I also need to retrieve the submissions file content via REST API.

I have just bumped to this problem on OJS 3.4.0.9 - is it bug? However, list of all submission files works perfectly. Problem occurs when we are trying to download single file. Even super admin token-key does not give access.

Hi, i’m having similar problem. After i added all roles to the test account i solved this error (“The current role does not have access to this operation”) but then i got “Access denied“ error :slight_smile: I’m trying to make automatic full text file download, so we can import them in other system. I managed to do this by using “public“ file URL, but the problem is with journals that are publicly hidden in OJS. Yes, we have some journals that use OJS just for article processing, but the final result is published somewhere else. Any help on this? Thx.

Regards.