Accept api endpoint as a parameter

When the end user has signed in via oauth, API key and endpoint should
be supplied separately. The datacenter is not in the API key that I'm
using.