Hello using python-lib "https://github.com/atlassian-api/atlassian-python-api" I am trying to execute the script but I get this response
HTTPError: Request rejected because issuer is either not authorized or not authorized to impersonate
what is the problem?
from atlassian import Confluence
token = {
'access_token': '<token>',
'token_type': 'bearer'
}
oauth2_dict = {
'client_id': '<id>',
'token': token
}
confluence = Confluence(
url='https://<url>.atlassian.net/wiki',
oauth2=oauth2_dict,
cloud=True)
status = confluence.create_page(
space='DEMO',
title='This is the title',
body='This is the body. You can use <strong>HTML tags</strong>!')
print(status)
Hi @VL
Please try the below code and let me know if this works
confluence = Confluence(
url='https://your-domain.atlassian.net',
username=jira_username,
password=jira_api_token,
cloud=True)
status = confluence.create_page(
space='DEMO',
title='This is the title',
body='This is the body. You can use <strong>HTML tags</strong>!')
print(status)
For more reference, follow the link below
https://atlassian-python-api.readthedocs.io
Thanks,
Pramodh
FYI, use email in place of username
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Pramodh M Everything worked out! Another question, if I add a script to the server, how can I not use personal mail in the script?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@VL Use the Syntax from Documentation
Use the Username and Password/Token
confluence = Confluence( url='http://localhost:8090', username='admin', password='admin')
Thanks,
Pramodh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.