var api = new HydrogenProtonApi.AuthApi();
There is no mention in the docs of needing to do.
api.setEnvironment("https://api.hydrogenplatform.com")
before making calls like api.createUsingPostClientCredentials()
but if you don't, this.tokenUrl is null when the callApi function runs
var request = superagent(httpMethod, this.tokenUrl + path);
which leads to a dns error because the hostname can't be resolved.