Added comment on an older topic so feel free to close this one if that is still alive.
It doesn’t appear that there is a way to download the file contents of an LFS tracked file using the repository files api. Repository files API | GitLab
I am not familiar with LFS. Can you do what you want to do using the GitLab web app? If so, you may be able to use an internal API normally used by the web app, authenticated by personal access tokens.
Funny you mentioned this. I just came back to update this topic.
Noted that the web app supported downloading the files as one would expect. So just used the download url for the application and passed in the same API token header that the API requires and it worked as expected.
Yep, indeed. I’ve found the same for the Docker registry, which doesn’t seem to have endpoints in the formal API. I’ve asked a question to see if anyone knows how stable the “hidden” API is