Skip to content

Commit

Permalink
IS-6653: Personal access token docs have outdated screenshots (#1357)
Browse files Browse the repository at this point in the history
* IS-6653: Personal access token docs have outdated screenshots

* IS-6653: Updated a screenshot blurring out additional details
  • Loading branch information
Rutam21 authored Apr 26, 2024
1 parent db2fbf4 commit 5884f5c
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions site/content/integrate/reference/personal-access-token/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,38 @@ Personal access tokens function similar to session tokens and can be used by int
## Create a personal access token

1. Enable personal access tokens in **System Console > Integrations > Integration Management**.

![Enable Access Token Settings under Integration Management using the System Console.](access_token_enable.png)

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 **System Console > User Management > Users**, search for the user account, then select **Manage Roles** from the dropdown.

![image](access_token_manage_roles.png)
![Apply appropriate Access Token permission through Manage Roles section under User Management using the System Console.](access_token_manage_roles.png)

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

![image](access_tokens_additional_roles.png)
![Provide additional Roles to the user using the User Management section in the System Console](access_tokens_additional_roles.png)

You may optionally allow the account to post to any channel in your Mattermost server, including direct messages by choosing the **post:all** role. **post:channels** role allows the account to post to any public channel in the Mattermost server.

Then select **Save**.

5. Sign in to the user account to create a personal access token.
6. Go to **Profile > Security > Personal Access Tokens**, then select **Create Token**.

![Create a Access Token in the Security tab under the Profile Menu.](access_token_create.png)

7. Enter a description for the token, so you remember what it's used for. Then select **Save**.

![Save the Access Token with a description.](access_token_save.png)

{{<note "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's recommended to create a personal access token for non-admin accounts.
{{</note>}}

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 {{< newtabref title="authenticate against the REST API" href="https://api.mattermost.com/#tag/authentication" >}}.

![image](access_token_settings.png)
![Find details about the Access Token on the Personal Access Token section in the Security tab of your Profile.](access_token_settings.png)

## Revoke a personal access token

Expand All @@ -47,11 +55,15 @@ Tokens can also be temporarily deactivated from the user's profile. Once deactiv
1. Sign in to the user account, select the user avatar, then select **Profile > Security > Personal Access Tokens**.
2. Identify the access token you want to revoke, then select **Delete** and confirm the deletion.

![Delete a Access Token through the Security tab under the Profile section.](access_token_delete_from_profile.png)

### System Console

1. Go to **System Console > User Management > Users**, search for the user account which the token belongs to, then select **Manage Tokens** from the dropdown.
2. Identify the access token you want to revoke, then select **Delete** and confirm the deletion.

![Delete a Access Token using the Manage Tokens section under User Management in the System Console.](access_token_delete_from_console.png)

## Frequently asked questions (FAQ)

### How do personal access tokens differ from regular session tokens?
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5884f5c

Please sign in to comment.