Token.byId()

Get Token by its document ID.

Signature

Token.byId(id: id) => Token | NullToken

Description

Gets the associated Token document if it exists and is accessible.

Parameters

Parameter Type Required Description

id

String

Yes

ID of the document to get.

Return value

One of:

Type Description

Token

Token document.

NullToken

Document doesn’t exist or is inaccessible. See NullDoc.

Examples

Token.byId("371233004820889634")
{
  id: "371233004820889634",
  coll: Token,
  ts: Time("2099-07-25T14:10:32.165Z"),
  document: Customer("111")
}

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!