I want to connect the confluence API using python code to extract data and information for my company's platform.
I have an admin account and I have used a URL to request a connection to the account:
# Connecting to the confluence API
response = requests.post("https://admin.atlassian.com/s/3264ff5d-6218-4e57-a69a-894f103a800b/content",
json = {
"APIKey": ""
}
)
This code when ran gives the status code of 403 Forbidden. I am sure that the URL I am using is correct and the API key also. However, I am unsure as to why I cannot grant access to the system and it is forbidden.
Is there a way to authenticate the requests to the URL to ensure that it runs and I get back a 200 status code?
I have looked at the OAuth2.0 Authentication on the confluence documentation page, however, it is difficult to understand as the code is not in python and it is hard to put into context of how it would be used in a situation like this.
If anyone is able to help, or explain how I would authenticate the requests using my admin account in python that would be great.