YouTrack Standalone 2017.2 Help

OAuth 2.0 Authorization

To access YouTrack resources via REST API you must log in, authorize, and obtain an access token for YouTrack. Authorization is provided by Hub service.

If you use an external Hub service for your standalone YouTrack, then you can use all OAuth 2.0 authorization flows supported by Hub. For detailed description, refer to the Hub Online Documentation.

The built-in Hub service that comes bundled with YouTrack supports only Implicit OAuth 2.0 authorization flow.

What Information You Should Have

Parameter

Description

Client service ID

— an id of the YouTrack service registered in the built-in Hub service. To get the service ID of YouTrack, open the Administration menu > Hub Integration page, and copy the YouTrack Service ID:

oauthYTServiceId

Client service secret

A secret for the YouTrack service associated with the client in Hub.

ScopeAlways

The ID of the YouTrack service. As the scope you can use the symbolic name of the YouTrack service in the built-in Hub: "YouTrack".

Client redirect URI

Depends on flow

An URI at the client application that can handle response from authorization server (Hub).

OAuth 2.0 Endpoints for Built-in Hub

For the built-in Hub service, the OAuth 2.0 endpoints for authentication and token are:

  • Authentication endpoint URL: <Hub Service BaseURL>/api/rest/oauth2/auth

  • Token endpoint URL: <Hub Service URL>/api/rest/oauth2/token

<Hub Service URL> is the URL that is configured for the Hub service in your network environment. For example, you have your company's server www.mycompany.com and a Hub service. You can configure Hub to be accessible by server.myjetbrains.com/hub or, let's say hub.mycompany.com. Subsequently, the OAuth 2.0 endpoints are as follows, respectively:

  • For www.mycompany.com/hub: https://www.mycompany.com/hub/api/rest/oauth2/auth and https://www.mycompany.com/hub/api/rest/oauth2/token

  • For hub.mycompany.com: https://hub.mycompany.com/api/rest/oauth2/auth and https://hub.mycompany.com/api/rest/oauth2/token.

Last modified: 7 March 2019