monica icon indicating copy to clipboard operation
monica copied to clipboard

Access avatars and photos through API

Open akn101 opened this issue 3 years ago • 4 comments

Is your feature request related to a problem? Please describe. The API is already able to provide links and information about photos related to a contact and also provide a link to their avatar, yet it doesn't seem possible yet to access these links and download the images through the API.

Describe the solution you'd like I'd like to be able to download avatars and images through the API. So far when accessing an image (i.e through https://monica.instance/store/photos/photo.jpeg) with a Bearer token, you're redirected to the login page. I'd like to have access to the image with a Bearer token.

akn101 avatar Jan 09 '22 22:01 akn101

Same issue here. Trying to use https://www.davx5.com/ to sync my contacts. However, the images can't be downloaded due to the redirect to the login page.

justjulian avatar Mar 24 '22 23:03 justjulian

There' already an API endpoint to upload an avatar (PUT /contacts/{contact}/avatar) as detailed in an issue here.

It would make sense to add a GET option to that endpoint.

I think a base64 representation of the image would be the easiest way to obtain the information.

sebastian-c avatar Jun 21 '23 11:06 sebastian-c

This has been a bit of a showstopper for one of my projects to create a relationship graph between my contacts and have pictures on all of the nodes. One of the more requested features of Monica is the creation of such a graph. This feature would ease the pressure by allowing third party developers to do it.

sebastian-c avatar Jun 21 '23 13:06 sebastian-c