API v2.x

refreshToken #

Refreshes an authentication token:

  • a valid, non-expired authentication token must be provided
  • the provided authentication token is revoked
  • a new authentication token is generated and returned

API Keys and token with infinite duration cannot be refreshed

Query Syntax #


Copied to clipboard!
URL: http://kuzzle:7512/_refreshToken[?expiresIn=<expiresIn>]
Method: POST

Other protocols #

Copied to clipboard!
  "controller": "auth",
  "action": "refreshToken",
  "expiresIn": "<expiresIn>"

Arguments #

Optional: #

Response #

The result contains the following properties:

Copied to clipboard!
  "status": 200,
  "error": null,
  "controller": "auth",
  "action": "refreshToken",
  "requestId": "<unique request identifier>",
  "volatile": {},
  "result": {
    "_id": "<kuid>",
    "jwt": "<JWT encrypted token>",
    "expiresAt": 1321085955000,
    "ttl": 360000