OAuth 2.0 Authorization
OAuth 2.0 lets an application obtain an access token and access YouTrack resources on behalf of an authorizing user. The Hub service connected to YouTrack provides OAuth authorization.
Choose an Authorization Method
Use OAuth 2.0 when your application needs users to authorize access to YouTrack. For scripts and integrations that don't require interactive user authorization, use a permanent token.
For new applications, use the Authorization Code flow with PKCE when possible.
Use implicit authorization only for browser-based clients that can't use the Authorization Code flow.
Availability
OAuth 2.0 authorization is provided by the Hub service connected to YouTrack. Starting with YouTrack 2026.2, system administrators can create and manage OAuth clients directly in YouTrack.
YouTrack deployment | OAuth support |
|---|---|
YouTrack Cloud or YouTrack Server with a built-in Hub service | OAuth clients are managed in YouTrack. Each client can be configured with the supported authorization flows, redirect URIs, and access to YouTrack resources on behalf of users. |
YouTrack Server connected to an external Hub service | Available OAuth 2.0 authorization flows are determined by the external Hub service. Availability depends on the Hub version and configuration. For details, see the Hub documentation. |
Endpoints
The built-in Hub service uses the following OAuth 2.0 endpoints:
Endpoint | URL |
|---|---|
Authorization |
|
Token |
|
For a YouTrack Server installation, append
/hubto the YouTrack Base URL. For example,https://www.company-youtrack.com/hub. You can find the Base URL on the Global Settings page.For a YouTrack Cloud instance, replace the
/youtrackpath in the YouTrack Base URL with/hub. For example,https://company-domain.youtrack.cloud/hub. You can find the Base URL on the Domain Settings page.
OAuth Clients
An OAuth client registration identifies an application to the Hub service and defines how the application can request access to YouTrack. REST API integrations, MCP clients, and other applications that support OAuth can use these registrations.
Each registered application has a client ID. Confidential clients also use a client secret. For new integrations, public clients should use the Authorization Code flow with PKCE without a client secret.
Access tokens issued for an OAuth client act on behalf of the user who authorized the application. They don't grant access beyond the permissions of the authorizing user.
A system administrator manages preregistered OAuth clients and automatic client registration in YouTrack. For configuration instructions, see OAuth Clients in YouTrack Cloud or OAuth Clients in YouTrack Server.
Preregistered Clients for MCP
For preregistration, a system administrator creates an OAuth client using the redirect URI and OAuth requirements provided by the MCP client application. The administrator then provides the generated client ID and, for a confidential client, the client secret to the application.
After the OAuth client is configured, users can approve the application's access request in YouTrack. This lets the application access YouTrack on behalf of the user without storing a permanent token locally.
Automatic OAuth Client Registration for MCP
Starting with YouTrack 2026.2, Client ID Metadata Documents (CIMD) let compatible MCP clients register OAuth clients automatically during authorization. Automatic registration must first be enabled by a system administrator and is disabled by default.
When automatic registration is enabled, users can connect a CIMD-compatible client using only the YouTrack MCP endpoint URL, for example https://youtrack.example.com/mcp, and approve its access request in YouTrack.
CIMD is different from Dynamic Client Registration. YouTrack doesn't support OAuth Dynamic Client Registration for MCP clients. If an MCP client doesn't support CIMD, use either a preregistered OAuth client or token-based authorization.
Implicit Authorization
YouTrack supports OAuth 2.0 authorization with implicit authorization as specified in the OAuth 2.0 Authorization Framework.
To obtain an access token from YouTrack, you need to provide values for the following parameters:
Requests
To start authentication, redirect the browser to the authorization endpoint:
Example:
To obtain an access token from YouTrack, you need to provide values for the following parameters in your authorization requests:
Parameter | Description |
|---|---|
| Specifies the grant type in an OAuth 2.0 request. For implicit grant, use |
| An identifier for the current application state. For example, it can be a key for a local storage object that contains information about the location of the current user in the client application. |
| A URI in your client application that can handle responses from Hub. |
| A parameter that determines whether the user should be asked to log in. The following values are recognized:
|
| The ID of the YouTrack service as registered in the built-in Hub service. To get the YouTrack service ID, open the page. ![]() This page is accessible from the page. For more information about this integration, please refer to the YouTrack documentation. |
| The access scope in which your API requests are processed. Use the symbolic name of the YouTrack service in the built-in Hub: |
Responses
The client service should be able to handle responses from Hub at the URL that is passed as the redirect_uri. Response parameters are passed after a hash sign in the URL. As a result, these parameters are not sent to the server and cannot be intercepted by a malefactor.
If the resource owner grants the access request, Hub issues an access token and delivers it to the client by adding the following parameters to the fragment component of the redirect URI using the "application/x-www-form-urlencoded" format:
Parameter | Description |
|---|---|
| The access token issued by Hub. |
| The type of the token that was issued by Hub. The value is case insensitive. |
| The lifetime of the access token, in seconds. For example, |
| Optional if identical to the scope requested by the client; otherwise, required. The scope of the access token in Hub is the |
| Required if the |
Note that the authorization server (Hub) does not issue a refresh token.
For example, the Hub server redirects the user-agent by sending the following HTTP response:
OAuth 2.0 Errors
If the request fails due to a missing, invalid, or mismatching redirect URI, or if the client identifier is missing or invalid, the Hub server informs the resource owner of the error and does not automatically redirect the user-agent to the invalid redirection URI.
If the resource owner denies the access request or if the request fails for reasons other than a missing or invalid redirection URI, the authorization server informs the client by adding the following parameters to the fragment component of the redirect URI using the "application/x-www-form-urlencoded" format:
Parameter | Description |
|---|---|
| A single ASCII [USASCII] error code. For a list of possible errors, see Authorization Response Errors and Token Response Errors. |
| Human-readable ASCII [USASCII] text providing additional information, used to help the client developer understand what went wrong. |
| A URI that identifies a human-readable web page with information about the error, used to provide the client developer with additional information. |
| Required if a "state" parameter was present in the client authorization request. The exact value received from the client. |
For example, Hub redirects the user-agent by sending the following HTTP response:
Authorization Response Errors
The following errors can be returned by a request to the authorization endpoint.
Token Response Errors
The following errors can be returned by a request to the token endpoint. For more information, read the definition of each error as defined in the RFC6749 standard.
