API returning user ID of -1 when uploading avatar

Because you have to specify user_id that is connecting with API, the one that the API Key is issued for, I guess?