API via token and permissions not working

Hi! I have been using the API for a while, everything working fine each user can see what they are supposed to during each state of the workflow, I always sended username:password for the authentication…
But lately I decided to try the token you get for each user, and tho the login part works fine (i am able to reach “/documents” for example, i am getting results = …while if I send it with username:pass I get all the documents it has access to )
its seems its not getting the permissions the user role has, when its done with the token…
Is there something I am missing? something I should check on the settings or so?
Thanks in advance!

Solved, at the hour of using token, you have to make sure you use the format “Authorization : Token Token_number”
If you don’t use this format, the API will still log you in (taking the token to some extent) but will log you as an anonymous user, instead of the user for which you send the token

1 Like

For more detail regarding the API browser the REST API section of the documentation: REST API — Mayan EDMS 4.5.2 documentation

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.