How to get the API token programatically?

… or to bypass it altogether?

I am going to develop a service to translate in-note hashtags into actual tags. It is going to run in a docker container and connect to the Joplin API, also running in that container.

In order to use this API I need to send the authentication key, otherwise I get a Missing token parameter error.

Is there a way to retrieve this token programatically? Or bypass it completely as it does not add anything in my scenario, security-wise ?

It’s in the SQLite database (in the settings table) so you can get it from there programmatically. It’s of course not accessible from the API as it’s used for security purposes, and it can’t be disabled for the same reasons.

1 Like

Fantastic, thank you very much!

Should someone be interested, it is specifically here:

sqlite> select value from settings where key='api.token';
2 Likes

The API key is no longer in the database.

2 options:

  • Desktop app > Config > Web Clipper > Authorization token > Copy token
  • cat ~/.config/joplin-desktop/settings.json |jq -r '."api.token"'
1 Like