How do I transfer custom information to the editor and from it to the plugin?

Do you want to: Ask a how-to question
Document Server version: latest
Type of installation of the Document Server: docker
OS: ubuntu 22.04

I would like to pass some custom data to the plugin from my main Vue project. My plugin uses the same remote API as my main project, and this API requires a JWT token. Can you please advise me on how to do this?

@giome3c :vulcan_salute:
Could you please provide a more detailed scenario and the difficulties you encountered?

We have a frontend application, a backend application, an OnlyOffice document server, and a custom plugin. To use the application, users are authorized through the frontend interface. During authorization, a JWT token is written to the local storage. The OnlyOffice editor is integrated into the frontend app. Some plugin features require using the same API as the frontend, but I need to somehow pass the JWT token to the plugin as well. Otherwise, the API will not work. I am not sure how to do this.

Hello, thank you for the details. Let me clairy this a bit. Do I understand correctly, the final goal here is to authorize your plugin with your application?
In this case, the token you are referring to, is it the same one used for Document Server and your Application integration or a separate one, which sole purpose is to authorize plugins features with your app?

I’m sorry, I didn’t understand your question completely, but I’ll do my best to answer it. :sweat_smile: I want to make requests from a plugin to a third-party API to get data. This API needs a token to function. The token is obtained by the user during authorization and is stored in the frontend app local storage.

@giome3c
I think allowing a plugin to read from local storage is a significant security risk.

And what is the alternative to that? And how do we at least do what you are talking about?
:sweat_smile: