Skip to content

Meilisearch JS / token / generateTenantToken

Function: generateTenantToken() ​

generateTenantToken(options): Promise<string>

Defined in: src/token.ts:157

Generate a tenant token.

Parameters ​

options ​

TenantTokenGeneratorOptions

Options object for tenant token generation

Returns ​

Promise<string>

The token in JWT (JSON Web Token) format

Remarks ​

Warning: while this can be used in browsers with TenantTokenGeneratorOptions.force, it is only intended for server side. Don't use this in production on the frontend, unless you really know what you're doing!

See ​

Securing your project