Skip to content

Commit 3f6cc5a

Browse files
committed
Added new documentation for use with Confluence Cloud
1 parent 852c44e commit 3f6cc5a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,16 @@ $page = $client->content()->get(123456789);
149149
$client->content()->delete($page);
150150
```
151151

152+
153+
# FAQ
154+
## How to authenticate with Confuence cloud?
155+
You have to use basic auth with your username and password. You can also use a personal access token instead of your password. See [Using personal access tokens](https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html) for more information.
156+
157+
Create a new API token here: https://id.atlassian.com/manage-profile/security/api-tokens
158+
159+
```php
160+
use CloudPlayDev\ConfluenceClient\ConfluenceClient;
161+
162+
$client = new ConfluenceClient('https://xxxxxxxx.atlassian.net/wiki/');
163+
$client->authenticateBasicAuth('USERNAME', 'TOKEN');
164+
```

src/Api/AbstractApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ abstract class AbstractApi
2626
/**
2727
* default rest API prefix for confluence
2828
*/
29-
private const URI_PREFIX = '/rest/api';
29+
private const URI_PREFIX = '/rest/api/';
3030

3131
private ConfluenceClient $client;
3232

0 commit comments

Comments
 (0)