Skip to content

Commit cb05145

Browse files
authored
Bitbucket: Corrected documentation for cloud authentication (atlassian-api#663)
* Bitbucket: Corrected documentation for cloud auth * Created additional section for Bitbucket cloud authentication, because it differs from the other services. * Updated to new Cloud class, because others are marked deprecated. * Gave more information how you can provide your credentials. * Add information you cannot login with regular password for Jira etc. * Corrected cloud link * Docs: Remove trailing space
1 parent b4ad06a commit cb05145

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

docs/index.rst

+25-6
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,12 @@ Or reuse cookie file:
170170
url='http://localhost:8080',
171171
cookies=cookie_dict)
172172
173-
To authenticate to the Atlassian Cloud APIs:
173+
To authenticate to the Atlassian Cloud APIs Jira, Confluence, ServiceDesk:
174174

175175
.. code-block:: python
176176
177177
# Obtain an API token from: https://id.atlassian.com/manage-profile/security/api-tokens
178+
# You cannot log-in with your regular password to these services.
178179
179180
jira = Jira(
180181
url='https://your-domain.atlassian.net',
@@ -188,16 +189,34 @@ To authenticate to the Atlassian Cloud APIs:
188189
password=jira_api_token,
189190
cloud=True)
190191
191-
bitbucket = Bitbucket(
192+
service_desk = ServiceDesk(
192193
url='https://your-domain.atlassian.net',
193194
username=jira_username,
194195
password=jira_api_token,
195196
cloud=True)
196197
197-
service_desk = ServiceDesk(
198-
url='https://your-domain.atlassian.net',
199-
username=jira_username,
200-
password=jira_api_token,
198+
And to Bitbucket Cloud:
199+
200+
.. code-block:: python
201+
202+
# Log-in with E-Mail / Username and regular password
203+
# or with Username and App password.
204+
# Get App password from https://bitbucket.org/account/settings/app-passwords/.
205+
# Log-in with E-Mail and App password not possible.
206+
# Username can be found here: https://bitbucket.org/account/settings/
207+
208+
from atlassian.bitbucket.cloud import Cloud
209+
210+
bitbucket = Cloud(
211+
url='https://api.bitbucket.org/',
212+
username=bitbucket_email,
213+
password=bitbucket_password,
214+
cloud=True)
215+
216+
bitbucket_app_pw = Cloud(
217+
url='https://api.bitbucket.org/',
218+
username=bitbucket_username,
219+
password=bitbucket_app_password,
201220
cloud=True)
202221
203222
.. toctree::

0 commit comments

Comments
 (0)