JetBrains Space Help

Authenticate and Authorize in Space

Space security is based on access tokens: To communicate with Space, an application should first obtain an access token. Then it can use this token to send requests to Space. The access token not only authenticates the app in Space (confirms that the app is registered in the system) but also authorizes it (defines what permissions in the system does the app have).

To obtain an access token, your application should use one of the authorization methods supported by Space:



OAuth 2.0 authorization

This method lets you implement one of the OAuth 2.0 authorization flows best suited for your application type. All these flows imply that your application obtains a temporary access token in the beginning of each communication session.

You select a particular authorization flow when you register the application in Space.

Permanent token authorization

This method uses a permanent token to authenticate and authorize an application on behalf of the application itself or on behalf of a Space user. This method is easier to implement and manage than OAuth 2.0 authorization, but is less secure.

Using the access token

Your application must send the obtained access token in the Authorization header when making requests to Space endpoints. For example:

GET Authorization: Bearer eyJhbGciOiJSUzUxMiJ9... Accept: application/json


If you create your application on top of the Space SDK, you can use the SpaceHttpClient class and its extension methods to implement a particular flow. Learn more

Last modified: 02 June 2022