Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Need to show only one dimension of avatarUrls using USER REST API

Shiva Reddy Gadiga December 26, 2021

2 answers

0 votes
Prince Nyeche
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 27, 2021

Why don't you access the JSON key specifically for "48x48"?

avatar = avatarUrls["48x48"]
Shiva Reddy Gadiga December 28, 2021

Hi Prince,

Thank you i have tried it and still it displaying all 4 dimensions.

Thank you,
Shiva.

Prince Nyeche
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 29, 2021

I would expect it to display only

https://secure.gravatar.com/avatar/1212121212?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FMB-5.png"

Which is the string of the URL and nothing more when accessing the specific key. Except you're still calling it as 

avatar = avatarUrls 
Shiva Reddy Gadiga December 29, 2021

Hi 

I have slightly modified the structure in JSON file for this avatar urls attributes.


Now able to see the selected dimension.

Regards,
Shiva.

0 votes
Mohamed Benziane
Community Champion
December 27, 2021

Hi,

Which URL do you use to get this response ?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events