CSRF token

A CSRF token is a secure random token (e.g., synchronizer token or challenge token) that is used to prevent CSRF attacks. This API retrieves the token for the current user session.

Get CSRF token

Returns CSRF token via the qlik-csrf-token header.

Facts

Rate limit Tier 1 (1000 requests per minute)

Responses

204

Successfully returned token in qlik-csrf-token header

400

Token is not supported for the auth mechanism being used.

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • meta object

        Non-standard information about the error

      • title string
        Required

        The error title.

      • detail string

        The detailed error message

      • status string

        The http status code.

404

Token not found

  • application/json object

    A representation of the errors encountered from the HTTP request.

    Show application/json properties
    • errors array of objects

      An error object.

      Show errors properties
      • code string
        Required

        The error code.

      • meta object

        Non-standard information about the error

      • title string
        Required

        The error title.

      • detail string

        The detailed error message

      • status string

        The http status code.

GET /api/v1/csrf-token
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({
hostConfig: {
host: 'https://{tenant}.{region}.qlikcloud.com',
apiKey: '<access-token>',
},
})
await qlik.csrfToken.getCsrfToken()
# qlik-cli has not implemented support for GET /api/v1/csrf-token yet.
curl "https://{tenant}.{region}.qlikcloud.com/api/v1/csrf-token" \
-H "Authorization: Bearer <access_token>"