I am working off the native android app in your github to connect to mattermost api here, specifically this one
and I am confused at where it says ApiUserRequired. Since it is a GET request, it cannot have a body so I am assuming that I have to put a User into the header? The line I am using in android is
@GET("/api/v3/teams/all_team_listings") Promise<Object> getAllTeamListings(@Header("user") User user);
getAllTeamListings creates a user with email, password, etc and passes it in.
As a side note, I am able to use
/api/v3/teams/all without a problem. I think it has to do with ApiUserRequired as that seems to be the only difference in between them. I have tried not having a header and having it return
Promise<User> but they don’t work.
The problem is that it returns a 401 error with a message that says
"Invalid or expired session, please login again." and the detailed error report just lists the token id. When messing around with params and stuff, I also occasionally get
Appears to be a CSRF attempt if anyone has any explanation for that, that would be nice.
Basically, I am asking, what is the difference between ApiAppHandler and ApiUserRequired? Or where can I find information on them?