Manage Permanent Tokens
In YouTrack Standalone, permanent tokens allows developers to access and perform operations securely via REST API calls in their scripts and applications without implementation of more complicated OAuth 2.0 authentication flows. A permanent token allows access to YouTrack instance with the permissions that are assigned to the user account with generated it.
This page covers operations with permanent tokens that are performed in the user profile. For a sample of REST API calls using the permanent token, refer to the Log in to YouTrack page in the Resources for Developers section.
Create a Permanent Token
To access a service programmatically with the permissions that are granted to your user account, create your own permanent token.
In addition to the permissions that are listed here, you need permission to read the service that you want to access with the token. Access to connected services is managed in Hub. If you work with YouTrack InCloud or a YouTrack Standalone installation that uses the built-in Hub service, all users have access to YouTrack services.
If your YouTrack Standalone installation uses an external Hub service, permission to read the connected service is granted in two ways:
The Access setting for the service grants group members access to the application from the Services menu. If you are a member of a group that is granted access in this way, you can create a permanent token to access the service. Basically, if you can see the name and icon for the service in the Services menu, you can generate a token to access the service.
You are granted the global Read Service permission.
If you are signed in and you don't see the option to create a token, ask an administrator to grant the Read Service permission to your account or to add you to a group for whom the service is visible.
To obtain a new permanent token:
Open your user profile.
Click the link to access your Hub account.
Select the Authentication tab.
Click the New token button.
- In the New Permanent Token dialog, specify a name for the new token and the access scope for it. The scope for the token is a list of services which you can access with this new token. For the YouTrack instance with the built-in Hub, a scope basically let you send REST API calls to the following endpoints:
Scope
URLs
Description
YouTrack
/rest/...
/api/...
Send API requests to the end-user part of YouTrack: issues, tags, commands, agile board, dashboard and reports.
YouTrack Administration
/hub/api/...
/hub/rest/...
Send API requests to the administration part of YouTrack: project and access management, server settings, etc.
- Click the Create token button.
A dialog window with the new token is displayed.
- Copy the token and keep it in a secure location.
A new token is associated with your user account and is displayed in the list in the Authentication tab.
Delete a Permanent Token
A permanent token does not have an expiration date. If you suspect that the transactions with a YouTrack service using a permanent token have been compromised, you can explicitly revoke this token in your profile.
To delete a permanent token:
Open your user profile. Switch to your Hub profile.
Open the Authentication tab.
In the list of tokens, select the token that you want to revoke.
- Click the trash button.
A confirmation dialog is displayed.
- Click the Delete button.
Selected permanent token is deleted and removed from the list.