Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Error 403 - Client not found - Attachment download

Gregor Ulbricht
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 15, 2020

Hallo,

i try to download attachments from the confluence sides. With this REST Api Call (https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-api-content-id-child-attachment-get) I can get all attachments on a side. This works as expected.

When I now try to download a attachment with the provided Link (seeing Answer: https://community.atlassian.com/t5/Confluence-questions/How-to-download-a-file-attached-in-confluence-page/qaq-p/650334) I'll get the following error:

status: 403,
text: '{"error":{"code":"Forbidden","title":"Client not found","href":"https://api.media.atlassian.com#UnauthorizedError"}}', method: 'GET'

 I also tried to access the link manually and with wget on Powershell there it works as expected and I get the file.

Node.js Superagent Request with Error:

superagent.get(fileURL).end((erranyresany=> {
if (err)
       console.log(err);
    console.log(res);
});

Powershell wget Command without Error:

wget "https://api.media.atlassian.com/file/.../binary?token=...&name=...&max-age=..."

Powershell Result:

StatusCode : 200
StatusDescription : OK
Content : {137, 80, 78, 71...}
RawContent : HTTP/1.1 200 OK
X-B3-Traceid: 2f5a1fff89cb7368
X-B3-Spanid: d7d7fb76b419dbf9
X-B3-Parentspanid: 69d13273d5f83dd5
X-B3-Sampled: 1 X-Dns-Prefetch-Control: off
X-Frame-Options: SAMEORIGIN
X-Downlo...
Headers : {[X-B3-Traceid, 2f5a1fff89cb7368], [X-B3-Spanid, 7d7fb76b419dbf9], X-B3-Parentspanid, 69d13273d5f83dd5], [X-B3-Sampled, 1]...}
RawContentLength : 20967

 

Thanks for your help,

Gregor Ulbricht

1 answer

1 accepted

0 votes
Answer accepted
Gregor Ulbricht
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 18, 2020

I was a bug in Connection with the node Plugin superagent and the proxy server connection.

In almost every case it works, when there is no proxy to set an empty proxy for superagent. When you try to download some files you can't set an empty proxy, either you set an active proxy or you set no proxy otherwise the above subscribed error occurs.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events