Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Personal access tokens function similar to session tokens and can be used by integrations to authenticate against the REST API. It is the most commonly used type of token for integrations.

Creating a Personal Access Token

1 - Enable personal access tokens in in System Console > Integrations > Custom Integrations in prior versions or System Console > Integrations .Image Removed> Integration Management in versions after 5.12.  To do this set "Enable Personal Access Tokens" to true.

2 - Identify the account you want to create a personal access token with. You may optionally create a new user account for your integration, such as for a bot account. By default, only System Admins have permissions to create a personal access token.

3 - To create an access token with a non-admin account, you must first give it the appropriate permissions. Go to to System Console > Users, search for the user account, and select select Manage Roles from  from the dropdown.

Image Modified

4 - Select Select Allow this account to generate personal access tokens.

...

7 - Enter a description for the token, so you remember what it’s used for. Then hit Save.


Info

Note:

If you create a personal access token for a System Admin account, be extra careful who you share it with. The token enables a user to have full access to the account, including System Admin privileges.

It is recommended to create a personal access token for non-admin accounts.


8 - Copy the access token now for your integration and store it in a secure location. You won’t be able to see it again!

9 - You’re all set! You can now use the personal access token for integrations to interact with your Mattermost server and authenticate against the Mattermost REST API.

...