Skip to content

Authentication

Receiving a temporary access token using API

POST https://uauth.iponweb.com/oauth2/token/

Generate a temporary access token based on the provided username and password

Request body

  • grant_type: authorization type. Possible values: password
  • username: username to login with
  • password: password for the specified username
  • scope: the service for which the generated access token can be used. Possible values: service_id=uslicer.iponweb.com, service_id=upredict.iponweb.com

Response

  • token_type: the type of the generated access token. Possible values: Bearer
  • scope: the service for which the generated access token can be used. Possible values: service_id=uslicer.iponweb.com, service_id=upredict.iponweb.com
  • access_token: generated access token
  • expires_in: access token validity period. Possible values: 3600 seconds

Example

Request

{
  "grant_type": "password",
  "username" : "test",
  "password" : "testpassword",
  "scope" : "service_id=uslicer.iponweb.com"
}
curl --data 'grant_type=password \
&username=test \
&password=testpassword \
&scope=service_id=uslicer.iponweb.com' \
"https://uauth.iponweb.com/oauth2/token/"

Response

{
  "token_type" : "Bearer",
  "scope" : "service_id=uslicer.iponweb.com",
  "access_token" : "<token>",
  "expires_in" : "3600"
}

Note: The following additional headers should be used in the command for receiving tokens from Python scripts:

Header

{
  'Content-Type': 'application/x-www-form-urlencoded'
}

Receiving a permanent access token using UI

To generate a permanent access token for u-Slicer using UI:

  • Open the https://uauth.iponweb.com/ link in your browser and authorize if it's necessary. The following dialog box is displayed:

    Permanent token 1

  • Click the Tokens and sessions button.

    Permanent token 2

  • Click the TOKENS link on the top navigation panel.

    Permanent token 3

  • Click the New permanent token button in the appeared dialog box with the list of available tokens. This list is empty, if you are creating your first token.

    Permanent token 4

  • Enter token Name and Scope (uslicer.iponweb.com) in the appeared New token creation dialog box.

    Permanent token 5

  • Click the Add button. The entered Scope is added to the list of Scopes.

    Permanent token 6

    You can use any Name. Use uslicer.iponweb.com Scope for u-Slicer.

  • Click the Create button.

  • If entered Scopes are correct, the new token is created and displayed.

    Permanent token 7

    Click the Copy token value button and save your token in a separate file.

  • Click the Done button to finish the operation.

    Permanent token 8

  • See your new token in the list.

Revoking a permanent access token

  • Open the https://uauth.iponweb.com/ link in your browser and authorize if it's necessary. The following dialog box is displayed:

    Revoke token 1

  • Click the Tokens and sessions button.

    Revoke token 2

  • Click the TOKENS link on the top navigation panel.

    Revoke token 3

  • Click the Revoke button.

    Revoke token 4

  • Click OK to confirm the revoking operation.

    Revoke token 5

  • See that the token is revoked.