My company is using Confluence Cloud.
I'm fetching a page from Confluence cloud (successfully, with a Perl app, but I'm talking any client), and the page has an attachment. When I GET the attachment, I get a 302 redirect, with a location.
Ok, but the location is at api.media.atlassian.com, and I'm using basic auth to get my pages. When I try to get my resource (an image) at the new location, I get this:
HTTP/1.1 401 Unauthorized
. . .a bunch of other stuff. . .
{"error":{"code":"ForbiddenError","title":"This resource requires authorization","href":"https://api.media.atlassian.com#AuthenticationGuide"}}
(Typing https://api.media.atlassian.com#AuthenticationGuide into a browser gives me a http 403.)
So how do I authenticate my client to api.media.atlassian? basic auth doesn't do it, my user id in a cookie doesn't do it; In the Web interface to Confluence Cloud, my browser receives a cookie called 'ajs_anonymous_id', but passing that cookie to api.media.atlassian doesn't work.
Suggestions welcome. . .
Yes, sorry, but perhaps someone else can benefit from my mistake. . .
I was using cURL to try to fetch the image. When I put the uri from the 'location' into quotes, it worked.
The authentication is in the 'token' part of the uri. The token expires after some time, not sure how long.
what does this mean in plain simple English imagine you are explaining it to a 7 year old
i got the same error just trying to understand what it could mean
thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.