Obviously token problem

I mean it’s bizarre how edited by moderator is your jwt token documentation and handling. If I got incorrect token there’s no way to see what’s missing or how is it different than expected. Don’t remember last time I had to register to some forum to ask question.
The documentation is overcomplicated but it just doesn’t give simple example:
frontend execute example + backend array example.
Please. Just gives an example what goes to jwt token encoding array from frontend config. Example:
docEditor = new DocsAPI.DocEditor(“iframeEditor”, {
token: “{{ jwt }}”,
document: {
title: ‘Template.docx’,
url: ‘http://test/1’,
fileType: ‘docx’,
key: ‘123’,
permissions: {
download: true,
edit: true, }, }, });

What exactly goes into jwt array?
That’s my payload array in php:
$payload = [

                "title" => 'Template.docx',
                "url" => 'http://test/1',
                "key" => '123',
                "fileType" => 'docx',
                "permissions" => [
                    "edit" => true,
                    "download" => true
                ]


        ];

So the same as in frontend but obviously I’ve got incorrect token error

Hello @slfd

Whole editor config must be signed as per documentation:

When a file is opened for editing in ONLYOFFICE Docs, the token must be added to the configuration to validate the parameters.
The payload for the JWT token in the JSON format must have the same structure as the config.