API requests returning a 403 error...(this one has a twist)

Steve Suranie June 2, 2023

My company is in the process of an M&A and I am trying to access the acquired company's Confluence instance through the API. I have access to the site, in fact, I am the site administrator...

admin-me.png

I can do all the stuff not working below on the parent company site. 

And I can plug a API query using the merged company's Atlassian URL into the browser and get results...

https://xxxxxxxxx.atlassian.net/wiki/rest/api/space returns all the site spaces. 

I made a token specifically for queries from the merged company, set it to base64encoded using my email:token format and pass it in the header as Authorization: Basic 64encoded-string

If I try to access using cURL or Python I get the same 'no soup for you' error: 

{

  "message": "Current user not permitted to use Confluence",

  "statusCode": 403

}

My cURL code: 

curl -D \

   -X GET \

   -H "Authorization: Basic a3RjQGthcmdvLmNvbTpldVFvbXhwd3RtaGpxxxxxxxxxxxxxx \

   -H "Content-Type: application/json" \

   "https://xxxxxxxx.atlassian.net/wiki/rest/api/space"| jq '.' -S

With Python I am using the Atlassian module. So initialize a Confluence class instance: 

commConfluence = Confluence(
url='https://xxxxxxxx.atlassian.net',
username="ssuranie@kargo.com",
password="
a3RjQGthcmdvLmNvbTpldVFvbXhwd3RtaGpBUUh1UW10VDVBNjQ=",
cloud=True)

and then I call it like: 

dictPage = commConfluence.get_page_by_id(strId, expand="body.storage", status=None, version=None)

Again, I can get this to work on the parent company Atlassian address but not the merged company. Am I missing something here? 

Thanks!


1 answer

1 accepted

0 votes
Answer accepted
Alex Waite
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 5, 2023

Hey @Steve Suranie - it looks like you've raised this under the Trello product forums, not the Confluence product forums. Can you raise this under Confluence at https://community.atlassian.com/t5/Confluence/ct-p/confluence

Better yet, if you need assistance with the API, the Developer Community may be better suited to you. You can chat to the Confluence Developer Community at https://community.developer.atlassian.com/c/confluence/6

Steve Suranie June 6, 2023

Done, not sure how I ended up here. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events