LKDevelopment / hetzner-cloud-php-sdk

A PHP SDK for the Hetzner Cloud API
MIT License
104 stars 51 forks source link

How to get the reset Password? #55

Closed ClayHostDE closed 3 years ago

ClayHostDE commented 3 years ago

I developed a Module and use the function $server->resetRootPassword();.

How to Print the Password?

LKaemmerling commented 3 years ago

You get a normal response from this method, so you should just get the password by using:


$response = $server->resetRootPassword()
var_dump($response->getResponsePart('root_password'));
ClayHostDE commented 3 years ago

ok thank you very much.

ClayHostDE commented 3 years ago

Can i set a custom password with this method?

LKaemmerling commented 3 years ago

No, actually please read the documentation of the Hetzner Cloud API. This SDK is just a wrapper for the API calls.