AnsweredAssumed Answered

Unable to download an attachement using Blackboard Learn REST APIs!

Question asked by dpbhatt on Mar 27, 2019
Latest reply on Jul 2, 2019 by yr.bogdan

I have been using Blackboard Learn for REST and LTI Developers version 3500.9.0 for my LTI tool development. I have an issue to download an attachment using the REST API. I am sending Bearer token in the header to call the APIs but I am always getting 500 ServerInternalError in HttpClient c#.

 

But when I call the API in Postman, I get the document. I tried to solve the issue but no luck at the end. Do I have to send anything else other than Authorization: Bearer token to the request? I mean any cookie or session value or something else. Any thoughts on this? Expert advice please for .NET.

 

When I paste the URL to a browser, I can see that there are the following 3 consecutive requests to get the result.

 

https://MyPublicDomain/learn/api/public/v1/courses/uuid:d32e128e62f8483699c26836e06cab32/contents/_27_1/attachments/_13_1/download

Status code: 302

 

https://MyPublicDomain/bbcswebdav/xid-1407_1?VxJw3wfC56=1553686558&Kq3cZcYS15=6716bb2d5bc71234eb11e01d75bc913&3cCnGYSz89=84qNDSCcatlso75PWQyDSJ7vlOw5hDPIgVcJ0Rohn4%3D

Status code: 302

 

https://MyPublicDomain/bbcswebdav/courses/1001/Blackboard%20code.txt?VxJw3wfC56=1553685718&Kq3cZcYS15=6716bb2d5bc740c29eb11e01d75bc913&3cCnGYSz89=N8PWMBdsase6HE6lOlmVhJQxC7Mx2jN8y6QX97mwun8%3D

Outcomes