has_token

Determines if a token exists in ThingsDB.

This function requires GRANT privileges on the @thingsdb scope.

This function does not generate an event.

Function

has_token(key)

Arguments

Argument Type Description
key str (required) Token key to check.

Return value

Returns true if the token exists and otherwise false.

Example

This code shows an example use case of has_token():

has_token('XXXXXXXXXXXXXXXXXXXXXX');

Return value in JSON format

false