Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit bbc8536

Browse files
committed
chore(docs): mention in the documentation about Bearer tokens
1 parent 46cbbec commit bbc8536

File tree

5 files changed

+52
-36
lines changed

5 files changed

+52
-36
lines changed

docs/User Guide/!!!meta.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9636,6 +9636,13 @@
96369636
"isInheritable": false,
96379637
"position": 10
96389638
},
9639+
{
9640+
"type": "relation",
9641+
"name": "internalLink",
9642+
"value": "habiZ3HU8Kw8",
9643+
"isInheritable": false,
9644+
"position": 20
9645+
},
96399646
{
96409647
"type": "relation",
96419648
"name": "internalLink",
@@ -9649,13 +9656,6 @@
96499656
"value": "default-note-title",
96509657
"isInheritable": false,
96519658
"position": 30
9652-
},
9653-
{
9654-
"type": "relation",
9655-
"name": "internalLink",
9656-
"value": "habiZ3HU8Kw8",
9657-
"isInheritable": false,
9658-
"position": 20
96599659
}
96609660
],
96619661
"format": "markdown",
@@ -10014,6 +10014,13 @@
1001410014
"isInheritable": false,
1001510015
"position": 40
1001610016
},
10017+
{
10018+
"type": "relation",
10019+
"name": "internalLink",
10020+
"value": "habiZ3HU8Kw8",
10021+
"isInheritable": false,
10022+
"position": 50
10023+
},
1001710024
{
1001810025
"type": "relation",
1001910026
"name": "internalLink",
@@ -10027,13 +10034,6 @@
1002710034
"value": "bx bx-list-plus",
1002810035
"isInheritable": false,
1002910036
"position": 10
10030-
},
10031-
{
10032-
"type": "relation",
10033-
"name": "internalLink",
10034-
"value": "habiZ3HU8Kw8",
10035-
"isInheritable": false,
10036-
"position": 50
1003710037
}
1003810038
],
1003910039
"format": "markdown",
@@ -11066,32 +11066,32 @@
1106611066
"mime": "text/markdown",
1106711067
"attributes": [
1106811068
{
11069-
"type": "label",
11070-
"name": "shareAlias",
11071-
"value": "script-api",
11069+
"type": "relation",
11070+
"name": "internalLink",
11071+
"value": "CdNpE2pqjmI6",
1107211072
"isInheritable": false,
1107311073
"position": 10
1107411074
},
1107511075
{
1107611076
"type": "relation",
1107711077
"name": "internalLink",
11078-
"value": "CdNpE2pqjmI6",
11078+
"value": "Q2z6av6JZVWm",
1107911079
"isInheritable": false,
1108011080
"position": 20
1108111081
},
1108211082
{
1108311083
"type": "relation",
1108411084
"name": "internalLink",
11085-
"value": "Q2z6av6JZVWm",
11085+
"value": "MEtfsqa5VwNi",
1108611086
"isInheritable": false,
1108711087
"position": 30
1108811088
},
1108911089
{
11090-
"type": "relation",
11091-
"name": "internalLink",
11092-
"value": "MEtfsqa5VwNi",
11090+
"type": "label",
11091+
"name": "shareAlias",
11092+
"value": "script-api",
1109311093
"isInheritable": false,
11094-
"position": 40
11094+
"position": 10
1109511095
}
1109611096
],
1109711097
"format": "markdown",

docs/User Guide/User Guide/Advanced Usage/ETAPI (REST API).md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,26 @@ As an alternative to calling the API directly, there are client libraries to sim
99

1010
* [trilium-py](https://github.com/Nriver/trilium-py), you can use Python to communicate with Trilium.
1111

12+
## Obtaining a token
13+
14+
All operations with the REST API have to be authenticated using a token. You can get this token either from Options -> ETAPI or programmatically using the `/auth/login` REST call (see the [spec](https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml)).
15+
1216
## Authentication
1317

14-
All operations have to be authenticated using a token. You can get this token either from Options -> ETAPI or programmatically using the `/auth/login` REST call (see the [spec](https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml)):
18+
### Via the `Authorization` header
1519

1620
```
1721
GET https://myserver.com/etapi/app-info
1822
Authorization: ETAPITOKEN
1923
```
2024

21-
Alternatively, since 0.56 you can also use basic auth format:
25+
where `ETAPITOKEN` is the token obtained in the previous step.
26+
27+
For compatibility with various tools, it's also possible to specify the value of the `Authorization` header in the format `Bearer ETAPITOKEN` (since 0.93.0).
28+
29+
### Basic authentication
30+
31+
Since v0.56 you can also use basic auth format:
2232

2333
```
2434
GET https://myserver.com/etapi/app-info

src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/ETAPI (REST API).html

Lines changed: 11 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Using Docker.html

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/public/app/doc_notes/en/User Guide/User Guide/Scripting/Script API.html

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)