Getting "Request Expired" Error during GetMultipleLeads | Community
Skip to main content
October 31, 2013
Question

Getting "Request Expired" Error during GetMultipleLeads

  • October 31, 2013
  • 4 replies
  • 1535 views
I am trying to retrieve 230K leads from Marketo via SOAP. After getting like 20K leads or so, I receive an error "Request Expired".

How can I avoid it? What is causing it?

Thanks,
Kiryl
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

October 31, 2013
The server signature and server timestamp used for SOAP authentication have a lifespan of 15 minutes.

Trying to retrieve all 230k leads in one go is likely to exceed that time. I can almost anticipate you are receiving SOAP error 20016.

The solution is simple: place the XML call within a loop so each time it receives a XML response with remainingCount greater than zero and a newStreamPosition, keep looping to get fresh timestamp and signature.

In most programming languages you can either use

remainingCount = 1;

while (remainingCount >= 1){
    // your code goes here
   // evaluate remainingCount from XML response
}
 
or 
 
do {
     statement(s)
} while (remainingCount >= 1);

Kenny_Elkington
Adobe Employee
Adobe Employee
October 31, 2013
To expand on what Breno said, you should limit your call to a batchSize of 1000 or less, and then use the paging method that Breno provided to retrieve the next set of leads.
October 31, 2013
I already doing most of what you guys mentioned. Except I am not resetting requestTimestamp and requestSignature in the loop itself. @bgomes: Did I understand this correctly? I am trying this now. Will re-post here if this solved the issue.
October 31, 2013
That solved my problem.

Thank you guys!