I am running the following code:
import requests
from requests.auth import HTTPBasicAuth
import json
url = "https://foo.atlassian.net/wiki/api/v2/attachments"
auth = HTTPBasicAuth("foo.bar@foobar.com", "MY_API_TOKEN")
headers = {
"Accept": "application/json",
}
response = requests.request(
"GET",
url,
headers=headers,
auth=auth
)
print(response)
essentially the exact copy of the code snippet provided here:
https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-attachment/#api-attachments-get
but i am getting a 401 error despite definitely using the correct API key and using the site admin email
Is this anything to do with the fact that I am on the free version?
If not is there a permission i need to configure on the Atlassian side so that this request goes thru?
Hello @Linda Zhao ,
API's are available for all of the pricing models. Make sure that all of the credentials are correct.
If nothing works from the above raise a support ticket for Atlassian.
BR,
Nikola
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.