Article ID: 121113, created on Apr 16, 2014, last review on Jul 5, 2016

  • Applies to:
  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 11.0 for Windows
  • Plesk 11.5 for Windows


How to create Autologin using an API request in Plesk?


Create an XML file, in this example it will be named request.xml, with the following content in case if you want to create a session for 'TEST_USER' user:

<?xml version='1.0'?>
    <packet version="">
                <!-- Base64-encoded IP address of client, who logs into Plesk -->
                <!-- Base64-encoded hostname of computer from which the request is sent -->

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

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-host-or-ip>:8443/enterprise/control/agent.php

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

Response may look like the following:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="">

Value of id tag will contain session token 'ede520d0fc93ae7aa0524076d631fba2'.

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

URL for Linux version of product:


For Windows version add PLESKSESSID the same as PHPSESSID to URL.


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

Search Words

Plesk SAML

Session token


a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c 01bc4c8cf5b7f01f815a7ada004154a2 29d1e90fd304f01e6420fbe60f66f838 0a53c5a9ca65a74d37ef5c5eaeb55d7f 85a92ca67f2200d36506862eaa6ed6b8 46a8e394d6fa13134808921036a34da8 bd7fc88cf1b01f097749ae6f87272128 514af229ae32522202a910a2649c80fb aea4cd7bfd353ad7a1341a257ad4724a 2a5151f57629129e26ff206d171fbb5f e335d9adf7edffca6a8af8039031a4c7 742559b1631652fadd74764ae8be475e

Email subscription for changes to this article
Save as PDF