Endpoints
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
The page result.
-   application/jsonobject
application/json properties
-   dataarray of objectsRequired
data properties
-   idstringRequired
The token ID.
 -   userIdstringRequired
The ID of the owning user.
 -   lastUsedstring
The last time the token was used.
 -   tenantIdstringRequired
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.
 
 -   
 -   linksobjectRequired
links properties
-   nextobject
next properties
-   hrefstringRequired
The URL for the link.
 
 -   
 -   prevobject
prev properties
-   hrefstringRequired
The URL for the link.
 
 -   
 -   selfobjectRequired
self properties
-   hrefstringRequired
The URL for the link.
 
 -   
 
 -   
 
 -   
 
400
Invalid request parameter for querying tokens.
-   application/jsonobject
A representation of the errors encountered from the HTTP request.
application/json properties
-   errorsarray of objects
List of errors and their properties.
errors properties
-   codestringRequired
The error code.
 -   metaobject
Non-standard information about the error.
 -   titlestringRequired
The error title.
 -   detailstring
The detailed error message.
 -   statusstring
The http status code.
 
 -   
 
 -   
 
401
Authentication failed.
-   application/jsonobject
A representation of the errors encountered from the HTTP request.
application/json properties
-   errorsarray of objects
List of errors and their properties.
errors properties
-   codestringRequired
The error code.
 -   metaobject
Non-standard information about the error.
 -   titlestringRequired
The error title.
 -   detailstring
The detailed error message.
 -   statusstring
The http status code.
 
 -   
 
 -   
 
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({  hostConfig: {    host: 'https://your-tenant.us.qlikcloud.com',    apiKey: '<access-token>',  },})
await qlik.oauthTokens.getOauthTokens({})qlik oauth-token lscurl "https://your-tenant.us.qlikcloud.com/api/v1/oauth-tokens" \-H "Authorization: Bearer <access_token>"Example 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"    }  }}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
-   tokenIdstringRequired
The ID of the token to revoke.
 
Responses
204
Token deleted successfully.
401
Authentication failed.
-   application/jsonobject
A representation of the errors encountered from the HTTP request.
application/json properties
-   errorsarray of objects
List of errors and their properties.
errors properties
-   codestringRequired
The error code.
 -   metaobject
Non-standard information about the error.
 -   titlestringRequired
The error title.
 -   detailstring
The detailed error message.
 -   statusstring
The http status code.
 
 -   
 
 -   
 
default
Unexpected error.
-   application/jsonobject
A representation of the errors encountered from the HTTP request.
application/json properties
-   errorsarray of objects
List of errors and their properties.
errors properties
-   codestringRequired
The error code.
 -   metaobject
Non-standard information about the error.
 -   titlestringRequired
The error title.
 -   detailstring
The detailed error message.
 -   statusstring
The http status code.
 
 -   
 
 -   
 
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({  hostConfig: {    host: 'https://your-tenant.us.qlikcloud.com',    apiKey: '<access-token>',  },})
await qlik.oauthTokens.deleteOauthToken(  'TiQ8GPVr8qI714Lp5ChAAFFaU24MJy69',)qlik oauth-token rm <tokenId>curl "https://your-tenant.us.qlikcloud.com/api/v1/oauth-tokens/{tokenId}" \-X DELETE \-H "Authorization: Bearer <access_token>"