-
Notifications
You must be signed in to change notification settings - Fork 5
Description
We received an email regarding the OAuth 2.0 migration (from API Users to API Credentials), and we're trying to implement this before the deprecation deadline.
The documentation here states:
"Newer versions of the Bandwidth SDKs handle the OAuth 2.0 Client Credentials flow for you. When initializing the SDK, provide your Client ID and Client Secret, and the SDK will manage token retrieval and refreshing automatically."
However, I cannot find any documentation or examples showing how to actually do this with @bandwidth/numbers. The current SDK (v1.10.0) only exposes userName and password for Basic Auth:
// Current - Basic Auth (working)
bandwidth.Client.globalOptions.userName = 'api_user';
bandwidth.Client.globalOptions.password = 'api_pass';
// Needed - OAuth 2.0 (how?)
bandwidth.Client.globalOptions.clientId = 'CLI-xxx';
bandwidth.Client.globalOptions.clientSecret = 'xxx';Questions:
- Does this SDK support OAuth 2.0?
- If yes, how do we pass Client ID and Client Secret?
- If not, is there a timeline for support?
We have our OAuth credentials ready and the token endpoint works (https://api.bandwidth.com/api/v1/oauth2/token), but we don't know how to integrate it with the SDK.
Any guidance would be appreciated!