Invalid Security Token Document Editor

Hello everyone,

I am using Onlyoffice’s latest document server (Developer Edition) version 7.4.1 on Windows 11 (without using docker).
When I try to open Word document using Document Editor @onlyoffice/document-editor-react I am getting this error “The document security token is not correctly formed. Please contact your Document Server administrator”.

I created the following token using the secret key from local.json and config as payload but it is not working:


I am able to open documents if I disable the token value from local.json but I want to use token because it is a must requirement if I want to open local files using the document editor;

Also, how can I restart the document server on Windows without using docker after modifying the config e.g local.json file. I have to restart my machine each time to reflect the changes.

Here you can see the error and the config files

Document Server version: exe
OS: Windows 11
Browser version: Chrome Version 117.0.5938.92

Hello @hereisfahad

Open Windows Services and restart all Document Server services there.

I’m not sure how you are providing token right now, but take a look at the documentation on React component about config:

config - Generic configuration object for opening a file with token.

Considering that, you have to provide token inside the initialization config to make it work.

If you still experiencing difficulties with proper JWT token usage, you can also install test example to check how it is implemented there:

By the way, if you have active license, you can also contact us via Zendesk to get prompt replies.

Thank you for your reply. I am generating a token with this payload and using the secret from the local.json config file.

      document: {
      editorConfig: {
        user: {
        customization: {
          customer: {},
          anonymous: {
            request: false,
          autosave: false,
          logo: {
            image: `logo.png`,
          uiTheme: "theme-classic-light",
          feedback: false,
          help: false,

Now, the error is not occurring, but I am getting this ‘Download Failed’ error.image

I am passing the token in the config prop just like mentioned in the documentation.


Please find logs of Document Server, archive them to share with us for analysis. For Windows installation logs are located in C:\Program Files\ONLYOFFICE\DocumentServer\Log\.