Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

What is good for?


There are two ways to obtain an authorization token. The first option is to create a token in the user interface. This option is the simplest and is recommended for most API applications.

The Oauth2 protocol can also be used to obtain a token. The steps described below describe the procedure for obtaining an authorization token using OAuth2. We recommend using one of the available libraries to implement OAuth2. More information and an introduction to OAuth2.

About OAuth2

OAuth 2.0 is the industry-standard protocol for authorization. OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications, desktop applications, mobile phones, and living room devices.

Info

Please mind, that examples in code-styled blocks can contain a different provider URL (basically system2.netrex.cz).

If you have an account under another provider, you have to change it according to yours provider URL (e.g. cloud.camstreamer.com)

\uD83D\uDCD8 Creating a client application

First, we will create a new OAuth2 application. The OAuth2 application allows authorization to the API using any owner or guest account. The client application management interface is available after logging in to your account.

...

  1. Click on the user icon in the upper right corner and select an option </> API.

    Image RemovedImage Added
  2. Click on OAuth2 Application.

    Image RemovedImage Added

  3. The OAuth2 application defines the requester for access to the application interface. Only full access accounts can create the application. The application can be used to authorize any system account.

  4. When creating an application, you need to enter the following information:

...

    1. name - any name, e.g. "My application"

...

    1. application description - any description

...

    1. list of redirect URLs - The URL to which the user is redirected after authorization

    Image Added


After OAuth2 is created, the application is generated:

  • client_id - unique application identifier

  • client_secret - application key

...

Info

We recommend creating a new client application for each integration.

Obtaining an authorization code

To obtain an authorization code, which can be further exchanged for an access token,  the endpoint https://system2.netrex.cz/oauth2/auth is used.

Code Block
POST: https://system2.netrex.cz/oauth2/auth/?response_type=code&client_id=CLIENT_ID&redirect_uri=CALLBACK_URL&scope=read,write

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@121e9
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "KCA"
labelskb-how-to-article