# Class: BEtapiToken

## BEtapiToken()

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 "_". This is also called "authToken" to distinguish it from tokenHash and token.

## Constructor

#### new BEtapiToken()

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

### Extends

- AbstractBeccaEntity

### Members

#### (protected) becca

Overrides:
  - AbstractBeccaEntity#becca
Source:
  - becca/entities/abstract_becca_entity.js, line 35

#### etapiTokenId :string

##### Type:

- string

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

#### isDeleted :boolean

##### Type:

- boolean

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

#### name :string

##### Type:

- string

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

#### tokenHash :string

##### Type:

- string

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

#### utcDateCreated :string

##### Type:

- string

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

#### utcDateModified :string

##### Type:

- string

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

### Methods

#### (protected) _getContent() → {string|Buffer}

Overrides:
  - AbstractBeccaEntity#_getContent
Source:
  - becca/entities/abstract_becca_entity.js, line 250

##### Returns:

Type
  string | Buffer

#### (protected) _setContent()

Overrides:
  - AbstractBeccaEntity#_setContent
Source:
  - becca/entities/abstract_becca_entity.js, line 128

#### (protected) beforeSaving()

Overrides:
  - AbstractBeccaEntity#beforeSaving
Source:
  - becca/entities/abstract_becca_entity.js, line 20

#### (protected) generateHash() → {string}

Overrides:
  - AbstractBeccaEntity#generateHash
Source:
  - becca/entities/abstract_becca_entity.js, line 59

##### Returns:

Type
  string

#### (abstract, protected) getPojo()

Overrides:
  - AbstractBeccaEntity#getPojo
Source:
  - becca/entities/abstract_becca_entity.js, line 82

#### (protected) getPojoToSave()

Overrides:
  - AbstractBeccaEntity#getPojoToSave
Source:
  - becca/entities/abstract_becca_entity.js, line 74

#### (protected) getUtcDateChanged()

Overrides:
  - AbstractBeccaEntity#getUtcDateChanged
Source:
  - becca/entities/abstract_becca_entity.js, line 27

#### 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:
  - AbstractBeccaEntity#markAsDeleted
Source:
  - becca/entities/abstract_becca_entity.js, line 267

#### (protected) putEntityChange()

Overrides:
  - AbstractBeccaEntity#putEntityChange
Source:
  - becca/entities/abstract_becca_entity.js, line 44

#### save() → {this}

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

Overrides:
  - AbstractBeccaEntity#save
Source:
  - becca/entities/abstract_becca_entity.js, line 91

##### Returns:

Type
  this