Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api.setEnvironment call required before use. No mention in docs. #135

Open
aviynw opened this issue Dec 17, 2021 · 1 comment
Open

api.setEnvironment call required before use. No mention in docs. #135

aviynw opened this issue Dec 17, 2021 · 1 comment

Comments

@aviynw
Copy link

aviynw commented Dec 17, 2021

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.

@aviynw
Copy link
Author

aviynw commented Dec 17, 2021

*this is for the javascript SDK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant