Confluence OAuth 403 Error

rjbrown1 May 8, 2018

Greetings All,

We have been attempting to utilize OAuth to access the Confluence API via Alteryx and Curl commands. The OAuth tutorial presented here: https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-oauth-authentication/ works successfully, and I am able to complete REST requests. However when we attempt to use the Access Token that was generated in a CURL command or in Alteryx we are presented with the following error:

Command:
curl -H "Authorization: Bearer <Access_Token>" "https://confluence.url.com/confluence/rest/api/content/78757429/child/attachment?filename=attachment.xlsx"

Response:
{"statusCode":403,"data":{"authorized":false,"valid":true,"errors":[],"successful":false},"message":"User not permitted to view attachments on content: ContentId{id=78757429}"}

I have been able to verify that I can log into Confluence and access the files, as well as confirmed that when I access the API after logging in via a browser and accessing the above link that I receive the JSON data I expect.

I exhausted my knowledge on what i"m sure is a simple fix. There must be something missing in my request header or body that is causing issue. I am hoping that the community may be able to assist.

For reference, I have tried adding the following during my troubleshooting attempts with no success:

-X GET

-H "Content-Type: application/json"

Authorization: Token <Access_Token>

Authorization: OAuth <Access_Token>

 

Thank you.

1 answer

0 votes
Sukumar Semalaiappan June 11, 2019

Ryan, did you solve this issue and what was the fix? I am facing the same issue..

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events