+ Start a Discussion

Apex Call Outs(Rest)

I am making an call out to a service,by hitting an url provided by mule,this service will return a pdf in base64encoded format, I am getting the below error 
Access control configuration prevents your request from being allowed at this time. Please contact your service provider....

Could anyone help how to resolve and acheieve this..

Thanks in Advance
This is the class I am using....
public class HttpCallout {

  public Blob basicCallout(){
  Http p = new Http();
 HttpRequest req = new HttpRequest();

 HTTPResponse res = p.send(req);
String resbody= res.getBody();

Blob beforeblob = res.getBodyAsBlob();

//string paramvalue = EncodingUtil.base64Encode(beforeblob);
String paramvalue = beforeblob.toString();
Blob afterblob = EncodingUtil.base64Decode(paramvalue);

 System.debug('is now decoded as: ' + afterblob.toString());

 return afterblob;
Seems like there is some time restriction on the API call that you make. It's open for some limited time.