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
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
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.
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
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.
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.
-
-
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"
}
}
}
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
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.
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
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.
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.
-
-
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>