Check out v4 of the Fauna CLI

v4 of the Fauna CLI is now in beta.

The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start.

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 */

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!