younifyd
Menu

Authenticate Share

Authenticate a Share

POST/shares/auth

Use it in a workflow

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

Request

Request body

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

sharestring (uuid)required

Primary key of the share you're authenticating against.

passwordstring (hash)

Password for the share, if one is configured.

modestring

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

One ofjsoncookiesessionDefault "json"

json
{
  "share": "3a606c3e-9d4d-4556-b7bb-f00860613da3",
  "password": "**********",
  "mode": "json"
}

Response

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

dataobject
access_tokenstring

Temporary access token to be used in follow-up requests. Note: if you used `session` as the mode in the request, the access token won\u0027t be returned in the JSON.

expiresinteger

How long before the access token will expire. Value is in milliseconds.

refresh_tokenstring

The token that can be used to retrieve a new access token through `/auth/refresh`. Note: if you used `cookie` or `session` as the mode in the request, the refresh token won\u0027t be returned in the JSON.

json
{
  "data": {
    "access_token": "eyJhbGciOiJI...",
    "expires": 900,
    "refresh_token": "yuOJkjdPXMd..."
  }
}

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

Was this page helpful?