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
Mike RochaMike Rocha 

Wrong REST API endpoint provided

We are an ISV partner and our application currently leverages the SF OAuth refresh token flow to get access to our users' Salesforce instances via the REST API. Upon receipt of an access token for communicating with the REST API, we record the instance_url parameter returned as part of the response and use that URL to communicate with the REST API, as outlined at 
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_web_server_oauth_flow.htm

It seems there has been the occasional user that gets a different instance_url value than their org is assigned. For example, the instance_url parameter returned is na1.salesforce.com, but their actual instance (the instance they're redirected to when they login to SF) is na12.salesforce.com. As a result, the API calls fail.