# Class: EtapiToken

## EtapiToken()

EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications. Used by: - Trilium Sender - ETAPI clients The format user is presented with is "<etapiTokenId>_<tokenHash>". This is also called "authToken" to distinguish it from tokenHash and token.

## Constructor

#### new EtapiToken()

Source:
  - becca/entities/etapi_token.js, line 17

### Extends

- AbstractEntity

### Members

#### etapiTokenId :string

##### Type:

- string

Source:
  - becca/entities/etapi_token.js, line 35

#### isDeleted :boolean

##### Type:

- boolean

Source:
  - becca/entities/etapi_token.js, line 45

#### name :string

##### Type:

- string

Source:
  - becca/entities/etapi_token.js, line 37

#### tokenHash :string

##### Type:

- string

Source:
  - becca/entities/etapi_token.js, line 39

#### utcDateCreated :string

##### Type:

- string

Source:
  - becca/entities/etapi_token.js, line 41

#### utcDateModified :string

##### Type:

- string

Source:
  - becca/entities/etapi_token.js, line 43

### Methods

#### markAsDeleted(deleteIdopt)

Mark the entity as (soft) deleted. It will be completely erased later. This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`deleteId` |  | <optional> | null |

Overrides:
  - AbstractEntity#markAsDeleted
Source:
  - becca/entities/abstract_entity.js, line 118

#### save() → {AbstractEntity}

Saves entity - executes SQL, but doesn't commit the transaction on its own

Overrides:
  - AbstractEntity#save
Source:
  - becca/entities/abstract_entity.js, line 73

##### Returns:

Type
  AbstractEntity