Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
franklupo committed Sep 8, 2023
2 parents 21669e1 + b411f05 commit eed3421
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ The result is class **Result** and contain methods:
From version 6.2 of Proxmox VE is possible to use [Api token](https://pve.proxmox.com/pve-docs/pveum-plain.html).
This feature permit execute Api without using user and password.
If using **Privilege Separation** when create api token remember specify in permission.
Format USER@REALM!TOKENID=UUID
Format `USER@REALM!TOKENID=TOKEN` (Usage example below)


## Installation

Expand Down Expand Up @@ -209,3 +210,17 @@ The parameter indexed end with '[n]' in documentation (method createVM in Qemu p
3 => "....",
]
```

### Usage with API-token instead username/password
```php
<?php

// Require the autoloader
require_once 'vendor/autoload.php';

//if you want use lite version only get/set/create/delete use PveClientBase

$client = new Corsinvest\ProxmoxVE\Api\PveClient("hostname", "8006");
$client->setApiToken("root@pam!mytokenname=<TOKEN COMES HERE>");
echo $client->getVersion();
```

0 comments on commit eed3421

Please sign in to comment.