• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Getting token via API fails

tontsa

New Pleskian
Hi,

I'm trying to retrieve the auth token for standalone edition using the /api/5.3/sites/UUID/token/ but it fails with error:
{"error":{"message":"Attribute \"SB_Facade_Value_UiSettings::sessionLifeTime\" is not set"}}

In sb-server I have /usr/local/sb/tmp/sitebuilder.log :
code: 400 94.199.58.140 Zend_Http_Client
2012-11-15T12:37:03+02:00 [EMERG] [System] /api/5.3/sites/2338b43d-cd3c-e843-d00c-00461d334b44/token/ SB_Facade_Value_Exception: Attribute "SB_Facade_Value_UiSettings::sessionLifeTime" is not set
file: /usr/local/sb/include/SB/Facade/Value.php
line: 224

Any ideas how to fix that?

Thanks in advance,
Toni Mattila
 
Hi Toni.

Your request is incorrectly encoded. Correct request body is:
[{"localeCode":"fi_FI","sessionLifeTime":3600}]


For correct encoding on php you can use such example:

$data = array(
array(
'localeCode' => 'fi_FI',
'sessionLifeTime' => 3600
)
);
$body = json_encode($data);
 
Hi,

Indeed, I was blind to that double array. That solved the issue, thank you very much Egor!

Best Regards,
Toni
 
Back
Top