How to get API token of terminal application?

Since this question was asked, it has been answered over here.

The API token can be retrieved from the database with a sqlite command like this:

sqlite3 ~/.config/joplin/database.sqlite 'select * from settings where key="api.token";'