-
Notifications
You must be signed in to change notification settings - Fork 5
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
Some requests throw 401 #64
Comments
Hey @yulierbrainhi - is this on all requests or some? when you get a successful request are you utilizing the same client or a different one? Do you have an example of a successful request so that I can compare? |
Hello @ajrice6713, this is just for some requests. The most interesting thing is that this same request works well for me with Postman, but with Axios or the SDK from NodeJs it does not work for me. This request works for me with the same username and password as the previous error: This previous request gives me an error with Axios and the SDK, but it works for me with Postman: |
After tracing the code I added this line and it works fine: numbers.Client.globalOptions.apiEndPoint = "https://dashboard.bandwidth.com:443/v1.0"; |
Hey @yulierbrainhi - sorry for the delay as I have been on holiday Glad that you found a workaround, my guess is there was an old API URL in there that was deprecated. I will get a ticket in to get this updated so that we ensure the client defaults to a working URL. Thanks for raising this issue! |
Hey @yulierbrainhi Looking a bit deeper into your logs
It looks like the accountId path parameter was missing in the request I have been unable to recreate, and the v1 and port in the URL shouldn't matter - can you confirm your accountId was resolving? |
Checklist
Description
In nodejs when I call some functions it throws a 401 error
Environment Information
Sample Code Snippet
Stack Trace
Expected Behavior
List of available numbers
The text was updated successfully, but these errors were encountered: