function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Borris DevBorris Dev 

INVALID_QUERY_LOCATOR

I have a SalesForce developer account and I am experimenting with the REST API. I have a simple query example that works in Workbench but fails in my own code. With Workbench, the following works as expected
 
/services/data/v41.0/query/?q=SELECT+PhotoUrl+FROM+Account

and I get JSON with 13 records and behaves as I would expect (this is all against the sample database created for a developer account). But when I try issuing my own HTTP GET:
https://eu9.salesforce.com/services/data/v41.0/query/?q=SELECT+PhotoUrl+FROM+Account

SalesForce returns with
 
{"message":"invalid query locator","errorCode":"INVALID_QUERY_LOCATOR"}

Some documentation talks about not being able to have more than 10 cursors into past results open. But I don't think this applies here - certainly there aren't enough records to be returned to hit the limit. Other posts I've seen, and my gut reaction, suggest this issue is occurring during some incorrect configuration somewhere. However, I am at a loss as to precisely which settings should be changed and how to navigate to find those settings. Any pointers would be much appreciated.
Jordan VasquezJordan Vasquez
Did you ever figure this out? I am running into the same problem myself.