How to pass file url in API?

I have a requirement where I have to pass user profile image in the user API. Apart from that, I need to send product images. I also want to send all the files related to user in API.

Anyone who have knowledge about this, Please let me know.

If you are speaking about files in tab “Linked files”, you must use API “/documents”

1 Like

Thanks for the response. This will help me, but I want to access them using URL. Like user’s image & product images. We are using dolibarr as backend only and frontend is headless. So is there is any way to access images outside dolibarr system?

If file is attached to an element (invoice, …), you can use the link on screen to download file. But it means you are in a logged session.
You can also use the API to get any attached file.