Auth Token Issue for avatar upload api

Hello, me and my team are implementing rocketchat on our app. We have made our own ui for our app.
lets take an example, i set my profile picture on our app and in that case i have to set that profile picture in rocketchat avatar as well.
Now i have been doing this using the setavatar api. i make the login call before the api and send its auth token with the setavatar api.
The problem is this works the first time and there on i get unauthorized error even though im logging in on each call and generating a new authtoken.

Hi! Welcome to our forums!!

In order to move forward on this (which may be a bug) we’ll need the exact steps in order to reproduce it.

On this case, it would help a lot to have the curl commands to run in the exact order to replicate this behavior.

I think that once we establish that we can consistently reproduce it, we may open an issue and escalate to our enginners.

Thanks for using Rocket.Chat :slight_smile: