1

I am trying to download a file from my IBM Cloud Connections server, after checking out the documentation found on their docs. I am using a URL I got in the JSON reply from getting my own Activities Stream (also using oAuth). the URL I am getting is in the form of

https://apps.collabservnext.com/files/form/api/library/{library-id}/document/{document-id}/media/{filename}

I replaced the form {auth} placeholder with oauth, according to the api docs. I keep getting 403 - FORBIDDEN in my replies. My request is being sent with the proper "Authorization" header, containing the right Bearer auth token (which works well in the Activities Stream requests, so it is still valid)

I tried replacing it with basic, and it works fine, so the URL itself is valid (The different ids).

Do I need to set specific permissions on my oAuth application, to be able to download files? How can I do that?

I also created the application as an "Internal App". I suspect the app will not be available outside of my company's cloud. Where can I create such an app that other admins will be able to use in their clouds, so that my javascript application be able to connect to their clouds?

Noam Gal
  • 3,315
  • 3
  • 36
  • 53
  • You should use /files/basic/api not /files/form/api as the starting components of your url, alternatively, you can use /files/oauth/api - these URLs are protected enabled specifically for API/Application access – Paul Bastide Nov 16 '15 at 02:02
  • I am trying to use the /files/oauth api, as this is what I want my users to use when connecting to IBM Cloud Connections. But it keeps returning 403 - FORBIDDEN whenever I try to download a file. – Noam Gal Nov 16 '15 at 06:43
  • switch to /files/basic/api - I've opened a defect on this previously. – Paul Bastide Nov 17 '15 at 15:06
  • Yeah, well - I saw that it works with "basic". But I need it to work with oauth, as I do not want to handle the user's user/password myself. Is there a link to your issue, so maybe I can vote on it? – Noam Gal Nov 17 '15 at 18:34
  • it's an internal defect. the /basic/ component will work with oauth – Paul Bastide Nov 17 '15 at 19:56
  • It seems to be working at the moment (with oauth both at the url, and in the headers). It might have been a bug/defect at the collabservnext server, and not something I was missing. – Noam Gal Nov 18 '15 at 12:13

0 Answers0