younifyd
Menu

Refresh

Refresh Token

POST/auth/refresh

Use it in a workflow

  1. Add a step and choose the Directus connector.
  2. Pick the Refresh action (under Authentication).
  3. Fill in the fields below, then reference the result from later steps as {{refresh.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

refresh_tokenstring

JWT access token you want to refresh. This token can't be expired.

modestring

Whether to submit and retrieve the refresh token in the JSON response, or in a `httpOnly` cookie.

One ofjsoncookiesessionDefault "json"

json
{
  "refresh_token": "eyJ0eXAiOiJKV...",
  "mode": "json"
}

Response

Returns 200 with an object. Read it in later steps with {{refresh.response.data.<field>}}.

dataobject
access_tokenstring
expiresinteger
refresh_tokenstring
json
{
  "data": {
    "access_token": "eyJhbGciOiJI...",
    "expires": 900,
    "refresh_token": "Gy-caJMpmGTA..."
  }
}

Need more? See the Directus guide for connection setup and behaviour shared by every action.