Forum Discussion

JasonMi's avatar
JasonMi
Lithium Alumni (Retired)
10 years ago

Lithium Avatar API Pulls

 We have another department that would like to sync customers' community avatars with their profile page. I believe the api field is here: https://community.lithium.com/t5/Community-API/bd-p/develope...
  • VarunGrazitti's avatar
    10 years ago

    JasonMi - Yes, you can do that, but for this you'd require atleast one common parameter which could pull the corresponding avatar for you.

     

    Workflow:

     

    On the Lithium instance, you can create an endpoint which would consume the common parameter from your external page, as the ID and login name would not be available in the external site, so I'd suggest on using email in the API. The same call can be used by passing the user email, which I am sure be the common parameter b/w your external site and the community.

     

    e.g. https://community.lithium.com/restapi/vc/users/email/[your_email_here]/profiles/avatar

     

    White list the external site domain on your community instance and make a REST call on you external site to the lithium endpoint, pass the email ID, fetch the avatar.

     

    I hope this helps.