# API returning user ID of -1 when uploading avatar

**URL:** <https://meta.discourse.org/t/api-returning-user-id-of-1-when-uploading-avatar/71784>\
**Category:** Development\
**Created:** [Outubro 10, 2017, 8:45pm UTC](https://meta.discourse.org/t/api-returning-user-id-of-1-when-uploading-avatar/71784 "2017-10-10T20:45:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Frank\_Bailey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frank_bailey/32/83927_2.png) [@Frank\_Bailey](https://meta.discourse.org/u/Frank_Bailey)\
**Post date:** [Outubro 11, 2017, 5:25am UTC](https://meta.discourse.org/t/api-returning-user-id-of-1-when-uploading-avatar/71784/4 "2017-10-11T05:25:07Z")

</div>

That was just the ticket, thank you MakaryGo 🙂

I think the documentation should be a bit clearer that the second step is required, because what’s the point of specifying the `user_id` in the first request if the uploaded avatar isn’t automatically assigned to the user?

---

_[View the full topic](https://meta.discourse.org/t/api-returning-user-id-of-1-when-uploading-avatar/71784)._
