An issue with displaying user avatars

Hi!

I have a problem — the user’s avatarUrl is sometimes null, but they do have an avatar (they sent me a screenshot from the board). In the user object (API response) I can see that the avatarSource is set to atlassianAccount and that they have some gravatarHash field if that matters.

Is there a way to construct the avatar path without using client side library in this case? Or maybe someone could point me to the docs specifying how to do that with atlassianAccount avatar sources?

Interesting. Let me see if I can’t get a test setup with this to figure out how to build the URL.

Can you ask the user to send you the source for their avatar? I’m curious if that would give us some clues as to how to build a source URL with the gravatarHash.

1 Like

There’s a related thread here: 403 getting User Avatar images from Atlassian Connect and a possible related report here: Jira Service Management (private)

1 Like

Generally, avatar URLs are in the format of:

https://trello-members.s3.amazonaws.com/{memberId}/{avatarHash}/50.png

And we return the avatarHash field in the 1/members/me response if the user has set their avatar to be public.

Chances are if you look at the prefs for the given user, they will look like this:

"prefs": {
  "privacy": {
    "fullName": "public",
     "avatar": "collaborator"
  },
  ...
}

In this case, the user has explicitly said that their avatar should only be made available to collaborators. So we do not expose it in the API responses.

1 Like