Hi,
I have use Proxmox API
When I'm using a root user it will return data
But when I'm using api user with Token
I don't know it about permission or something but I can get User in node normaly.
thanks!
I have use Proxmox API
When I'm using a root user it will return data
PHP:
$configure = [
'hostname' => 'proxmoxDomain',
'username' => 'root',
'password' => 'xxxxxxx',
];
Request::Login($configure);
$acl = [
'userid' => "Test",
'password' => 'Test',
'email' => 'Test@Test.com',
'enable' => '1',
];
$createUser = Access::createUser($acl);
var_dump($createUser);
[data] => [errors] => stdClass Object ( [userid] => invalid format - value 'Test' does not look like a valid user name )
But when I'm using api user with Token
PHP:
$configure = [
'hostname' => 'proxmoxDomain',
'username' => 'apiAccount',
'token_name' => 'apiUsername',
'token_value' => 'xxxxxxxx-xxxxxxxx-xxxxxxxxx',
];
Request::Login($configure);
$acl = [
'userid' => "Test",
'password' => 'Test',
'email' => 'Test@Test.com',
'enable' => '1',
];
$createUser = Access::createUser($acl);
var_dump($createUser);
["data"]=> NULL
I don't know it about permission or something but I can get User in node normaly.
thanks!
Last edited: