# User avatar selection through API no longer working

**URL:** <https://meta.discourse.org/t/user-avatar-selection-through-api-no-longer-working/211661>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [December 9, 2021, 8:59pm UTC](https://meta.discourse.org/t/user-avatar-selection-through-api-no-longer-working/211661 "2021-12-09T20:59:16Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [December 22, 2021, 12:52am UTC](https://meta.discourse.org/t/user-avatar-selection-through-api-no-longer-working/211661/16 "2021-12-22T00:52:39Z")

</div>

I’m not able to find any recent update that would have stopped avatars to work via the api when all the site settings have them blocked. Regardless, if you are using SSO (or [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true)), you should be using the `/admin/users/sync_sso` api route to update the users avatar not the UI route (`/u/username/preferences/avatar/pick`).

And pass in these params in the request body:

```plaintext
avatar_url: "url-of-image",
avatar_force_update: "true"

```

---

_[View the full topic](https://meta.discourse.org/t/user-avatar-selection-through-api-no-longer-working/211661)._
