My FreshChat app collects the user’s API key during installation, and uses it to make API calls on their behalf. I recently discovered, however, that now FreshChat accounts hosted in different data centres require different API endpoints to be used. For example, for the Indian data centre the endpoint is https://api.in.freshchat.com/v2/ and for the US it’s https://api.freshchat.com/v2/
Is there a best practice for how to identify the proper data centre for the user so that we can make API calls on their behalf to the correct API endpoint? Or should we just attempt each of the endpoints until one of them works, then use that one going forward for that user?