Cannot get secret key to work with OnlyOffice

I am running NC 20.0.6.
I have a native OnlyOffice installation, running behind an nginx proxy.
If I don’t use a secret key, I can use my OnlyOffice with Nextcloud fine.

I set up a secret key by adding a local.json and restarting the docserver. I then went into the OnlyOffice settings in my Nextcloud, and added the secret key. It connects to the OnlyOffice server, then returns the error message “Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.) (version 6.4.0.0)”

The OnlyOffice nginx server logs show:

192.168.112.3 - - [02/Sep/2021:19:01:09 +0000] "GET /healthcheck HTTP/1.1" 200 4 "-" "Nextcloud Server Crawler"
192.168.112.3 - - [02/Sep/2021:19:01:09 +0000] "POST /coauthoring/CommandService.ashx HTTP/1.1" 200 31 "-" "Nextcloud Server Crawler"
192.168.112.3 - - [02/Sep/2021:19:01:10 +0000] "POST /ConvertService.ashx HTTP/1.1" 200 325 "-" "Nextcloud Server Crawler"
192.168.112.3 - - [02/Sep/2021:19:01:10 +0000] "GET /cache/files/conv_check_1961541228_docx/output.docx/check_1961541228.docx?md5=tadtgD6KV33Zt46G2yiYYQ&expires=1630610171&filename=check_1961541228.docx HTTP/1.1" 200 7898 "-" "Nextcloud Server Crawler"

The nextcloud log shows

Error	Exception: Error occurred in the document service: Invalid token
/var/www/html/custom_apps/onlyoffice/lib/documentservice.php - line 302:

OCA\Onlyoffice\DocumentService->ProcessCommandServResponceError(6)

/var/www/html/custom_apps/onlyoffice/lib/documentservice.php - line 408:

OCA\Onlyoffice\DocumentService->CommandRequest("version")

/var/www/html/custom_apps/onlyoffice/controller/settingscontroller.php - line 169:

OCA\Onlyoffice\DocumentService->checkDocServiceUrl(OC\URLGenerator {}, OCA\Onlyoffice\Crypt {})

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 169:

OCA\Onlyoffice\Controller\SettingsController->SaveAddress("https://xr. ... /", "", "", false, "", false)

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 100:

OC\AppFramework\Http\Dispatcher->executeController(OCA\Onlyoffi ... {}, "saveAddress")

/var/www/html/lib/private/AppFramework/App.php - line 152:

OC\AppFramework\Http\Dispatcher->dispatch(OCA\Onlyoffi ... {}, "saveAddress")

/var/www/html/lib/private/Route/Router.php - line 309:

OC\AppFramework\App::main("SettingsController", "saveAddress", OC\AppFramew ... {}, { _route: "o ... "})

/var/www/html/lib/base.php - line 1008:

OC\Route\Router->match("/apps/onlyo ... s")

/var/www/html/index.php - line 37:

OC::handleRequest()

My local.json is:

{
 "services": {
  "CoAuthoring": {
			"secret": {
				"browser": {"string": "SecretKey", "file": "", "tenants": {}},
				"inbox": {"string": "SecretKey", "file": "", "tenants": {}},
				"outbox": {"string": "SecretKey", "file": ""},
				"session": {"string": "SecretKey", "file": ""}
			},
			"token": {
				"enable": {
					"browser": true,
					"request": {
						"inbox": true,
						"outbox": true
					}
				},
				"browser": {
					"secretFromInbox": true
				},
				"inbox": {
					"header": "Authorization",
					"prefix": "Bearer ",
					"inBody": false
				},
				"outbox": {
					"header": "Authorization",
					"prefix": "Bearer ",
					"algorithm": "HS256",
					"expires": "5m",
					"inBody": false,
					"urlExclusionRegex": ""
				},
				"session": {
					"algorithm": "HS256",
					"expires": "30d"
				},
				"verifyOptions": {
					"clockTolerance": 60
				}
			}
  }
 }
}

Can anyone suggest how to get this working?