Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

How to create autologin using an API request in Plesk for Linux?

 
admin panelcontrol panelguidehostinghttps

Question

How to create autologin using an API request in Plesk?

Answer

Note: This article may require additional administrative knowledge to apply. If any help required, contact server’s administrator or hosting support.

1. Log in to Plesk server via SSH or a Linux workstation.

2. Create an XML file with the following content (in this example it will be named
request.xml
):

<?xml version='1.0'?>
<packet version="1.6.3.5">
<server>
<create_session>
<login>TEST_USER</login>
<data>
<!-- Base64-encoded IP address of client, who logs into Plesk -->
<user_ip>MTkyLjE2OC4zNC4xOTI=</user_ip>
<!-- Base64-encoded hostname of computer from which the request is sent -->
<source_server>d3BiLXNpdGUudGxk</source_server>
</data>
</create_session>
</server>
</packet>

Session token will be created for the user identified by login.

3. Send created XML file to Plesk using
curl
:

# curl -kLi -H "Content-Type: text/xml" -H "HTTP_AUTH_LOGIN: admin" -H "HTTP_AUTH_PASSWD: PASSWORD" -H "HTTP_PRETTY_PRINT: TRUE" -d @request.xml https://<server-hostname-or-ip>:8443/enterprise/control/agent.php

NOTE : Only '
admin
' user is able to create session token for clients/resellers logins.

Response will look like the following:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.3.3">
<server>
<create_session>
<result>
<status>ok</status>
<id>ede520d0fc93ae7aa0524076d631fba2</id>
</result>
</create_session>
</server>
</packet>

Value of
id
tag will contain session token. In this example, '
ede520d0fc93ae7aa0524076d631fba2
'.

Now, the script can redirect user’s browser to
rsession_init.php
and user will be logged in to Control Panel.

4. Login to Plesk using the session token:

For Linux:

https://<server-hostname-or-ip>:8443/enterprise/rsession_init.php?PHPSESSID=ede520d0fc93ae7aa0524076d631fba2&success_redirect_url=<success_redirect_url>

For Windows:

https://<server-hostname-or-ip>:8443/enterprise/rsession_init.php?PLESKSESSID=ede520d0fc93ae7aa0524076d631fba2

Here is the list of options:


  • PHPSESSID
    (Linux only) - session token.

  • PLESKSESSID
    (Windows only) - session token.

  • success_redirect_url
    (optional) - URL where browser will be redirected after successful login procedure.

  • failure_redirect_url
    (optional) - URL where browser will be redirected after failure login attempt. Also this parameter will be used as logout URL.

  • no_frames
    (optional, deprecated) - show admin panel without frames

  • locale_id
    (optional) - locale name (e.g. de-DE)

Additional information is available in XML API Guide

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Securing the WordPress Frontier with WP Guardian

Read More »

Introducing WP Guardian Vulnerability Protection: Now available for WP Toolkit

Read More »

Laravel Application Hosting in Plesk

Read More »
Knowledge Base

 An operation fails in Plesk: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘X’ for key ‘PRIMARY’

Read More »

How to customize Plesk URL

Read More »

How to provide Plesk Support with server access?

Read More »

Unable to open the Plesk Extensions page: Unable to connect to the extensions catalog: Connection timed out

Read More »

Hosting Wiki

  • Server Redundancy
  • Linux Containers
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • JavaScript
  • PHP
  • Hosting Control Panel
  • Plesk
  • Web Server
  • DNS Server
  • IPv6
  • IPv4
  • SIP
  • SSH
  • UDP/IP
  • URL
  • Colocation Hosting
  • Reseller Hosting
  • Cloud Hosting
  • VPS Hosting
  • Dedicated Hosting
  • Shared Hosting
  • Free Hosting
  • Managed Hosting
  • TCP/IP
  • HTTP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family