OAuth tokens

List and revoke active OAuth tokens issued for your tenant.

Download specification

List OAuth tokens

Retrieve list of OAuth tokens that the user has access to. Users assigned with a TenantAdmin role can list OAuth tokens generated for all users in the tenant.

Facts

Rate limit Tier 1 (1000 requests per minute)
Categories authenticate

Query Parameters

  • limitnumber

    The maximum number of tokens to return.

  • pagestring

    The target page.

  • sortstring

    The field to sort by.

    Can be one of: "userId"

  • userIdstring

    The ID of the user to limit results to.

Responses

200

application/json

The page result.

  • application/jsonobject
    Show application/json properties
    • dataarray of objects
      Required
      Show data properties
      • idstring
        Required

        The token ID.

      • userIdstring
        Required

        The ID of the owning user.

      • lastUsedstring

        The last time the token was used.

      • tenantIdstring
        Required

        The ID of the owning tenant.

      • deviceTypestring

        The type of the user device the authorization token is generated for (Tablet, Phone etc.).

      • descriptionstring

        The description of the token.

    • linksobject
      Required
      Show links properties
      • nextobject
        Show next properties
        • hrefstring
          Required

          The URL for the link.

      • prevobject
        Show prev properties
        • hrefstring
          Required

          The URL for the link.

      • selfobject
        Required
        Show self properties
        • hrefstring
          Required

          The URL for the link.

400

application/json

Invalid request parameter for querying tokens.

A representation of the errors encountered from the HTTP request.

  • application/jsonobject

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Non-standard information about the error.

      • titlestring
        Required

        The error title.

      • detailstring

        The detailed error message.

      • statusstring

        The http status code.

401

application/json

Authentication failed.

A representation of the errors encountered from the HTTP request.

  • application/jsonobject

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Non-standard information about the error.

      • titlestring
        Required

        The error title.

      • detailstring

        The detailed error message.

      • statusstring

        The http status code.

GET /v1/oauth-tokens
curl "https://your-tenant.us.qlikcloud.com/api/v1/oauth-tokens" \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/oauth-tokens',
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
qlik oauth-token ls

Response

{
  "data": [
    {
      "id": "string",
      "userId": "string",
      "lastUsed": "2018-10-30T07:06:22Z",
      "tenantId": "string",
      "deviceType": "string",
      "description": "string"
    }
  ],
  "links": {
    "next": {
      "href": "string"
    },
    "prev": {
      "href": "string"
    },
    "self": {
      "href": "string"
    }
  }
}

Revoke an OAuth token by ID

Revokes a specific OAuth token by ID. Requesting user must have TenantAdmin role assigned to delete tokens owned by other users.

Facts

Rate limit Tier 2 (100 requests per minute)
Categories authenticate

Path Parameters

  • tokenIdstring
    Required

    The ID of the token to revoke.

Responses

204

Token deleted successfully.

401

application/json

Authentication failed.

A representation of the errors encountered from the HTTP request.

  • application/jsonobject

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Non-standard information about the error.

      • titlestring
        Required

        The error title.

      • detailstring

        The detailed error message.

      • statusstring

        The http status code.

default

application/json

Unexpected error.

A representation of the errors encountered from the HTTP request.

  • application/jsonobject

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errorsarray of objects

      List of errors and their properties.

      Show errors properties
      • codestring
        Required

        The error code.

      • metaobject

        Non-standard information about the error.

      • titlestring
        Required

        The error title.

      • detailstring

        The detailed error message.

      • statusstring

        The http status code.

DELETE /v1/oauth-tokens/{tokenId}
curl "https://your-tenant.us.qlikcloud.com/api/v1/oauth-tokens/{tokenId}" \
-X DELETE \
-H "Authorization: Bearer <access_token>"
const https = require('https')
  const data = JSON.stringify("")
  const options =   {
    'hostname': 'https://your-tenant.us.qlikcloud.com',
    'port': 443,
    'path': '/api/v1/oauth-tokens/{tokenId}',
    'method': 'DELETE',
    'headers': {
      'Authorization': 'Bearer <access_token>'
    }
  }
  const req = https.request(options)
  
qlik oauth-token rm <tokenId>