Using a submit token
If you run lmrtfy with a headless setup (Raspberry Pi, server, google colab, ..) you cannot use
lmrtfy login to authenticate.
If you are running a web frontend that calls an LMRTFY function you can use
The following listing creates a token for a
<funtion> that is available in
tokens can be issued for any function that you can call.
1 2 3 4 5 6 7
The token always starts with
token_id is needed to revoke the deployment key when you
don't want to use it anymore. Keep the deployment token secret.
In order to use deployment key you need to set the
LMRTFY_ACCESS_TOKEN environment variable:
$ LMRTFY_ACCESS_TOKEN="LMRTFY..." ipython In : from lmrtfy.functions import catalog Out: ... In : job = catalog.<namespace>.<function>(...)
This way you can use
lmrtfy on any platform, that does not allow a regular login.
To revoke the submit key, you just need to do the following:
|Revoke the key|
If the revocation failed, it will raise an error.
Tokens will be available in the web app.