• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

Issue Permission Denied Error with Auto Login Button Using Plesk API on Debian 10

Julian44222

New Pleskian
Hi everyone,

I'm experiencing an issue with the Auto Login Button on my website and I'm hoping to get some insights from this knowledgeable community. I'm currently using Debian 10 and the latest version of Plesk.

Here's the problem: Every time I try to use the Auto Login Button, I encounter a "permissions denied" error. This is confusing because I've already granted remote API rights to the reseller and ensured that only the API is accessible for this purpose.

Below is the function I'm using in my implementation:


Code:
public function generateSession($node_id, $username, $userip)
{
$this->client = new \PleskX\Api\Client($this->getHost($node_id)['ip']);
$this->client->setCredentials($this->getHost($node_id)['name'], $this->getHost($node_id)['password']);

return $this->getHost($node_id)['host_url'].'enterprise/rsession_init.php?PLESKSESSID='.$this->client->server()->createSession($username, $userip);
}

I'm wondering if there's something I'm missing or if there's an issue with my configuration. Has anyone faced a similar issue or can provide some guidance on how to resolve this?

Any help or suggestions would be greatly appreciated!

Thanks in advance!
Julian Weith
 
Where exactly do you encounter the "permissions denied" error? When calling the API or when clicking the link when generated by the API call?

And did this used to work earlier for you? Or has this always been the case?
 
If you manually create a session with the API (for example with use of the API Explorer extension) and use that session on the url https://<server-hostname-or-ip>:8443/enterprise/rsession_init.php?PLESKSESSID=<session_token>, does that work?
 
Back
Top