Finding user_id for hubot-auth

I’m trying to use hubot-auth with Mattermost. The first thing I need to set though is the IDs for admins as a ENV variable, e.g. HUBOT_AUTH_ROLES=“admin=U12345678 mod=U87654321,U67856745”

Is there an easy way to find out the ID for an account in Mattermost so that I can put it into the variable?

Cheers

Hi @lwhitworth,

Apologies for the late response.

The user ID is not surfaced in the UI anywhere so the best way to figure out your user ID would be to make a request to our /api/v3/users/me which will return a JSON object containing your ID. You will need to add the Authorization header with the value BEARER <yourtokenhere>. You can find your token in your browser cookies when logged in on a Mattermost page.

You can make the request with a simple curl if you’re familiar with using the commandline or you can use a tool like the Chrome extension Postman.