Skip to main content
Question

Salesforce SDK no longer working after May 10 refresh - status 302

  • May 22, 2025
  • 1 reply
  • 13 views

Forum|alt.badge.img

Hi: After getting a developer token, we have been connecting to box to download audio files in to Salesforce. The following piece of code stopped working after May 10 upgrade. I was told to look for lower-case headers in the response. But still no luck. Can you help?  Here is my sample code. 

 

Http h1 =newHttp();
Httprequest req1 =newHttpRequest();
req1.setEndpoint(endPointUrl);
req1.setMethod('GET');
req1.setHeader('connection','keep-alive');
req1.setHeader('authorization', 'Bearer '+accessToken);
req1.setHeader('content-Type','audio/mpeg');
try {
String fileLocation, extFileURL;
blob fileBlob;
HttpResponse response =newHttpResponse();
if(!Test.isRunningTest()){
response=h1.send(req1);
fileLocation=response.getHeader('location');  // I donot get the header back, get status 302
System.debug('File Loction '+fileLocation);
}

1 reply

Forum|alt.badge.img

Hello, 

I see you were able to continue working with our support team to solve this issue! 

Best,

Kourtney, Box Developer Advocate