• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • 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 Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

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