# בחירת אוואטר משתמש דרך API כבר לא עובד

**URL:** <https://meta.discourse.org/t/user-avatar-selection-through-api-no-longer-working/211661>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [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:** 1

<div class="post-metadata">

**Author:** ![Spac3Rat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/spac3rat/32/167772_2.png) [@Spac3Rat](https://meta.discourse.org/u/Spac3Rat)\
**Post date:** [9 בדצמבר,‏ 2021,‏ 8:59pm UTC](https://meta.discourse.org/t/user-avatar-selection-through-api-no-longer-working/211661/1 "2021-12-09T20:59:16Z")

</div>

Hi everyone. I am using SSO on my forum and avatars are controlled by my website.

Until a few days ago, avatar upload/update from the website to the Discource, via API was working. I now get a 422 - Unprocessable Entity error.

I’ve tried to debug the issue, did some testing with Postman and I have the same issues. The request I am doing is below (with url, username and api\_key removed, of course).

Does any of you know if there’s any issue with this portion of Discourse?

Thank you in advance.

My example:

```plaintext
curl --location --request PUT 'https://{{URL}}/u/{{USERNAME}}/preferences/avatar/pick' \
--header 'Api-Key: {{API_KEY}}' \
--header 'Api-Username: system' \
--header 'Content-Type: application/json' \
--data-raw '{
"upload_id": 972,
"type": "uploaded"
}'

```

---

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