Skip to content
On this page

This is an auto-generated document to support extension builders understand the internal packages they can utilize. To find our written guides, tutorials, and API/SDK reference, check out our main docs .

Directus / @directus/sdk / rest / authenticateShare

Function: authenticateShare()

authenticateShare<Schema>(share, password): RestCommand<Object, Schema>

Shares work by publicly giving you an access/refresh token combination (as you would get with the regular /auth/login endpoints). These tokens are limited to a permissions set that only allows access to the item that was shared, and any relationally linked items that that associated role has access to. This means that all regular endpoints can be used with the credentials set returned by this endpoint.

Type parameters

Schema extends object

Parameters

share: string

Shares work by publicly giving you an access/refresh token combination (as you would get with the regular /auth/login endpoints). These tokens are limited to a permissions set that only allows access to the item that was shared, and any relationally linked items that that associated role has access to. This means that all regular endpoints can be used with the credentials set returned by this endpoint.

password: string

Password for the share, if one is configured.

Returns

RestCommand<Object, Schema>

Authentication Credentials

access_token

access_token: string

expires

expires: number

refresh_token

refresh_token: string

Source

rest/commands/utils/shares.ts:12