+ 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 

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.