create token where the current document is located?

Hello,
is it possible to create a session token / persistent token where the current document is located?

For example:
const docPath = app.activeDocument.path;
const docPathShort = docPath.substr(0,docPath.lastIndexOf("/"));
localStorage.setItem(“session-token”, await fs.createSessionToken(docPathShort));

Thank you guys for your help.
Best regards

Hi, no one has an idea, or is the post lost :-/?

Because the document may be a cloud document, there’s currently no way to do achieve this with the API surface.