secret_key: Authentication in the XML API Service
Using the CLI utility secret_key is another way to generate a key
that can be used in XML API calls for authentication in Plesk. Plesk’s
XML API interface provides the secret_key operator, which serves the
same purpose.
Usage
secret_key <command> [
<option_1> [<param>]
[<option_2> [<param>]]
]
Example
The following command creates a secret key and associates it with the IP address 192.168.1.100:
plesk bin secret_key -c -ip-address 192.168.1.100
Commands
| Command | Parameter | Description | Example | 
|---|---|---|---|
| --create or -c | Generates a secret key for the specified IP address. Used with the  | To create a secret key associated with the IP address 192.168.1.100 and the description “test key”: plesk bin secret_key --create -ip-address 192.168.1.100 -description "test key" | |
| --listor-l | Displays a list of existing secret keys, their IP addresses and descriptions. | To display all secret keys issued by Plesk: plesk bin secret_key --list | |
| --deleteor-d | <key> | Removes the specified secret key. Used with the  | To delete the key becc9673c714723515ca9bbeb6c83c73: plesk bin secret_key --delete -key becc9673c714723515ca9bbeb6c83c73 | 
| --helpor-h | Displays help on the usage of the utility. | To view help on the use of the utility: plesk bin secret_key -h | 
Options
| Option | Parameter | Description | Example | 
|---|---|---|---|
| -ip-address | <ip address> | The IP address with which the key is associated. From this address you are going to send XML API requests to the Plesk server. Used with the  | To create a secret key associated with the IP address 192.168.1.100 and the description “test key”: plesk bin secret_key,exe -create -ip-address 192.168.1.100 -description "test key" | 
| -description | <string> | Description of the secret key. Used with the --createcommand. | |
| -key | <string> | Secret key. Used with the --deletecommand. | To delete the key becc9673c714723515ca9bbeb6c83c73: plesk bin secret_key --delete -key becc9673c714723515ca9bbeb6c83c73 |