Skip to content

Commit 69255f3

Browse files
authored
Update README.md
Add 2FA docs
1 parent c98765a commit 69255f3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,12 @@ For example. We want to use the API2 to add a subdomain
4949
$response = $capi->api2->SubDomain->addsubdomain(['rootdomain' => 'domain.com', 'domain' => 'sub']);
5050
print_r($response);
5151
```
52+
53+
### 2 Factor Authentication
54+
55+
To use this class on a cPanel instance with 2 Factor authentication, you need to pass the secret into the class constructor.
56+
```
57+
$capi = new cpanelAPI('user', 'password', 'cpanel.example.com', 'secret');
58+
```
59+
60+
The secret can be found on the 2fa setup page. See: https://documentation.cpanel.net/display/ALD/Two-Factor+Authentication+for+cPanel#Two-FactorAuthenticationforcPanel-Configure2FA

0 commit comments

Comments
 (0)