The Fauna service will be ending on May 30, 2025.

For more information on the service wind down, see our announcement and the Fauna Service End-of-Life FAQ.

token.delete()

Learn: Tokens

Delete a token.

Signature

delete() => NullToken

Description

Deletes a token, represented as a Token document.

A token is a type of authentication secret used to provide identity-based access to a Fauna database. Fauna stores tokens as documents in the Token system collection.

Parameters

None

Return value

Type Description

NullToken

Document doesn’t exist. See NullDoc.

Examples

Token.byId("401671202234433613")!.delete()
Token("401671202234433613") /* deleted */
\