• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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