Summary
Other users can not download my uploaded files and they got “detailed_error”:“UserRequired” error.
Steps to reproduce
I am using the v5.38.0.
- Upload a file in a channel using the POST endpoint “/files”
- Send it with a post using the POST endpoint “/posts”
- File is sent properly, I can download it, but other people after clicking it the URL “/files/{file_id}?download=1” returns a JSON error:
{"id":"api.context.session_expired.app_error","message":"Sesión inválida o vencida, por favor inicia sesión otra vez.","detailed_error":"UserRequired","request_id":"1cfhe451xpd3jnijwohfpf3oqe","status_code":401}
Expected behavior
At previous step 3, the download should just start for the other people as when I click on it.
Observed behavior
- After upload file:
Error1 — ImgBB - After send post with the file attached:
Error2 — ImgBB - If another user in channel that is not me clicks on the button, the error is thrown:
{"id":"api.context.session_expired.app_error","message":"Sesión inválida o vencida, por favor inicia sesión otra vez.","detailed_error":"UserRequired","request_id":"1cfhe451xpd3jnijwohfpf3oqe","status_code":401}
This is developed using a React app and connecting Mattermost server using HTTP requests.
Thank you for your help!