diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 2450528..032bb40 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -202,6 +202,9 @@ src/Bandwidth.Standard/Api/TranscriptionsApi.cs
src/Bandwidth.Standard/Client/ApiClient.cs
src/Bandwidth.Standard/Client/ApiException.cs
src/Bandwidth.Standard/Client/ApiResponse.cs
+src/Bandwidth.Standard/Client/Auth/OAuthAuthenticator.cs
+src/Bandwidth.Standard/Client/Auth/OAuthFlow.cs
+src/Bandwidth.Standard/Client/Auth/TokenResponse.cs
src/Bandwidth.Standard/Client/ClientUtils.cs
src/Bandwidth.Standard/Client/Configuration.cs
src/Bandwidth.Standard/Client/ExceptionFactory.cs
diff --git a/README.md b/README.md
index 00b0a95..70f81cf 100644
--- a/README.md
+++ b/README.md
@@ -78,6 +78,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CallsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -349,3 +351,11 @@ Authentication schemes defined for the API:
- **Type**: HTTP basic authentication
+
+### OAuth2
+
+- **Type**: OAuth
+- **Flow**: application
+- **Authorization URL**:
+- **Scopes**: N/A
+
diff --git a/api/openapi.yaml b/api/openapi.yaml
index cfdbd76..7113704 100644
--- a/api/openapi.yaml
+++ b/api/openapi.yaml
@@ -11,6 +11,7 @@ servers:
- url: /
security:
- Basic: []
+- OAuth2: []
tags:
- name: Messages
- name: Media
@@ -14800,4 +14801,10 @@ components:
- Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==`
scheme: basic
type: http
+ OAuth2:
+ flows:
+ clientCredentials:
+ scopes: {}
+ tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token
+ type: oauth2
diff --git a/bandwidth.yml b/bandwidth.yml
index 6ee15ae..9ab77fd 100644
--- a/bandwidth.yml
+++ b/bandwidth.yml
@@ -9,6 +9,7 @@ info:
version: 1.0.0
security:
- Basic: []
+ - OAuth2: []
tags:
- name: Messages
- name: Media
@@ -8427,6 +8428,12 @@ components:
- Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==`
+ OAuth2:
+ type: oauth2
+ flows:
+ clientCredentials:
+ tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token
+ scopes: {}
callbacks:
inboundCallback:
'{inboundCallbackUrl}':
diff --git a/docs/CallsApi.md b/docs/CallsApi.md
index 05a24cf..0b466eb 100644
--- a/docs/CallsApi.md
+++ b/docs/CallsApi.md
@@ -37,6 +37,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CallsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -92,7 +94,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -142,6 +144,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CallsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -197,7 +201,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -247,6 +251,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CallsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -314,7 +320,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -364,6 +370,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CallsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -417,7 +425,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -468,6 +476,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CallsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -524,7 +534,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/ConferencesApi.md b/docs/ConferencesApi.md
index 1d6da39..b956ad8 100644
--- a/docs/ConferencesApi.md
+++ b/docs/ConferencesApi.md
@@ -41,6 +41,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ConferencesApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -98,7 +100,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -148,6 +150,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ConferencesApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -203,7 +207,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -253,6 +257,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ConferencesApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -310,7 +316,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -360,6 +366,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ConferencesApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -417,7 +425,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -467,6 +475,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ConferencesApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -522,7 +532,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -572,6 +582,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ConferencesApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -635,7 +647,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -685,6 +697,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ConferencesApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -738,7 +752,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -788,6 +802,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ConferencesApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -844,7 +860,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -894,6 +910,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new ConferencesApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -949,7 +967,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/MFAApi.md b/docs/MFAApi.md
index 525197a..c8d7e4a 100644
--- a/docs/MFAApi.md
+++ b/docs/MFAApi.md
@@ -35,6 +35,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new MFAApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -90,7 +92,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -136,6 +138,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new MFAApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -191,7 +195,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -237,6 +241,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new MFAApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -292,7 +298,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/MediaApi.md b/docs/MediaApi.md
index da780d2..dc2862f 100644
--- a/docs/MediaApi.md
+++ b/docs/MediaApi.md
@@ -36,6 +36,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new MediaApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -87,7 +89,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -137,6 +139,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new MediaApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -192,7 +196,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -242,6 +246,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new MediaApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -297,7 +303,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -347,6 +353,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new MediaApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -404,7 +412,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md
index 52296ff..ddd281a 100644
--- a/docs/MessagesApi.md
+++ b/docs/MessagesApi.md
@@ -34,6 +34,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new MessagesApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -89,7 +91,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -140,6 +142,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new MessagesApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -247,7 +251,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/MultiChannelApi.md b/docs/MultiChannelApi.md
index 9bef903..5df7ea1 100644
--- a/docs/MultiChannelApi.md
+++ b/docs/MultiChannelApi.md
@@ -33,6 +33,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new MultiChannelApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -88,7 +90,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/PhoneNumberLookupApi.md b/docs/PhoneNumberLookupApi.md
index 14265b4..84488bd 100644
--- a/docs/PhoneNumberLookupApi.md
+++ b/docs/PhoneNumberLookupApi.md
@@ -35,6 +35,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new PhoneNumberLookupApi(config);
var accountId = 9900000; // string |
@@ -90,7 +92,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -133,6 +135,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new PhoneNumberLookupApi(config);
var accountId = 9900000; // string |
@@ -286,7 +290,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/RecordingsApi.md b/docs/RecordingsApi.md
index ec1e1b3..21fdfb8 100644
--- a/docs/RecordingsApi.md
+++ b/docs/RecordingsApi.md
@@ -42,6 +42,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RecordingsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -95,7 +97,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -145,6 +147,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RecordingsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -198,7 +202,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -248,6 +252,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RecordingsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -301,7 +307,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -351,6 +357,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RecordingsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -408,7 +416,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -458,6 +466,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RecordingsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -515,7 +525,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -565,6 +575,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RecordingsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -622,7 +634,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -672,6 +684,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RecordingsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -733,7 +747,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -783,6 +797,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RecordingsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -838,7 +854,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -888,6 +904,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RecordingsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -943,7 +961,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -993,6 +1011,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new RecordingsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -1046,7 +1066,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/StatisticsApi.md b/docs/StatisticsApi.md
index 73aa157..075657f 100644
--- a/docs/StatisticsApi.md
+++ b/docs/StatisticsApi.md
@@ -33,6 +33,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new StatisticsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -86,7 +88,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/TollFreeVerificationApi.md b/docs/TollFreeVerificationApi.md
index 6915196..bb69f97 100644
--- a/docs/TollFreeVerificationApi.md
+++ b/docs/TollFreeVerificationApi.md
@@ -41,6 +41,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new TollFreeVerificationApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -96,7 +98,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -146,6 +148,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new TollFreeVerificationApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -197,7 +201,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -247,6 +251,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new TollFreeVerificationApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -298,7 +304,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -348,6 +354,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new TollFreeVerificationApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -403,7 +411,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -453,6 +461,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new TollFreeVerificationApi(config);
@@ -501,7 +511,7 @@ This endpoint does not need any parameter.
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -551,6 +561,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new TollFreeVerificationApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -604,7 +616,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -653,6 +665,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new TollFreeVerificationApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -704,7 +718,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -753,6 +767,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new TollFreeVerificationApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -806,7 +822,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -855,6 +871,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new TollFreeVerificationApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -912,7 +930,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/docs/TranscriptionsApi.md b/docs/TranscriptionsApi.md
index 577c33a..4cf6b66 100644
--- a/docs/TranscriptionsApi.md
+++ b/docs/TranscriptionsApi.md
@@ -35,6 +35,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new TranscriptionsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -88,7 +90,7 @@ void (empty response body)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -138,6 +140,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new TranscriptionsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -195,7 +199,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
@@ -245,6 +249,8 @@ namespace Example
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
+ // Configure OAuth2 access token for authorization: OAuth2
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new TranscriptionsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
@@ -300,7 +306,7 @@ catch (ApiException e)
### Authorization
-[Basic](../README.md#Basic)
+[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
### HTTP request headers
diff --git a/src/Bandwidth.Standard/Api/CallsApi.cs b/src/Bandwidth.Standard/Api/CallsApi.cs
index 5f3b308..749cda4 100644
--- a/src/Bandwidth.Standard/Api/CallsApi.cs
+++ b/src/Bandwidth.Standard/Api/CallsApi.cs
@@ -16,6 +16,7 @@
using System.Net;
using System.Net.Mime;
using Bandwidth.Standard.Client;
+using Bandwidth.Standard.Client.Auth;
using Bandwidth.Standard.Model;
namespace Bandwidth.Standard.Api
@@ -519,6 +520,22 @@ public Bandwidth.Standard.Client.ApiResponse CreateCallWithH
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
}
+ // authentication (OAuth2) required
+ // oauth required
+ if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
+ {
+ if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+ else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) &&
+ !string.IsNullOrEmpty(this.Configuration.OAuthClientId) &&
+ !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) &&
+ this.Configuration.OAuthFlow != null)
+ {
+ localVarRequestOptions.OAuth = true;
+ }
+ }
// make the HTTP request
var localVarResponse = this.Client.Post("/accounts/{accountId}/calls", localVarRequestOptions, this.Configuration);
@@ -608,6 +625,22 @@ public Bandwidth.Standard.Client.ApiResponse CreateCallWithH
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
}
+ // authentication (OAuth2) required
+ // oauth required
+ if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
+ {
+ if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+ else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) &&
+ !string.IsNullOrEmpty(this.Configuration.OAuthClientId) &&
+ !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) &&
+ this.Configuration.OAuthFlow != null)
+ {
+ localVarRequestOptions.OAuth = true;
+ }
+ }
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.PostAsync("/accounts/{accountId}/calls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@@ -694,6 +727,22 @@ public Bandwidth.Standard.Client.ApiResponse GetCallStateWithHttpInfo
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
}
+ // authentication (OAuth2) required
+ // oauth required
+ if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
+ {
+ if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+ else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) &&
+ !string.IsNullOrEmpty(this.Configuration.OAuthClientId) &&
+ !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) &&
+ this.Configuration.OAuthFlow != null)
+ {
+ localVarRequestOptions.OAuth = true;
+ }
+ }
// make the HTTP request
var localVarResponse = this.Client.Get("/accounts/{accountId}/calls/{callId}", localVarRequestOptions, this.Configuration);
@@ -782,6 +831,22 @@ public Bandwidth.Standard.Client.ApiResponse GetCallStateWithHttpInfo
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
}
+ // authentication (OAuth2) required
+ // oauth required
+ if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
+ {
+ if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+ else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) &&
+ !string.IsNullOrEmpty(this.Configuration.OAuthClientId) &&
+ !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) &&
+ this.Configuration.OAuthFlow != null)
+ {
+ localVarRequestOptions.OAuth = true;
+ }
+ }
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync("/accounts/{accountId}/calls/{callId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@@ -901,6 +966,22 @@ public Bandwidth.Standard.Client.ApiResponse GetCallStateWithHttpInfo
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
}
+ // authentication (OAuth2) required
+ // oauth required
+ if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
+ {
+ if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+ else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) &&
+ !string.IsNullOrEmpty(this.Configuration.OAuthClientId) &&
+ !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) &&
+ this.Configuration.OAuthFlow != null)
+ {
+ localVarRequestOptions.OAuth = true;
+ }
+ }
// make the HTTP request
var localVarResponse = this.Client.Get>("/accounts/{accountId}/calls", localVarRequestOptions, this.Configuration);
@@ -1022,6 +1103,22 @@ public Bandwidth.Standard.Client.ApiResponse GetCallStateWithHttpInfo
{
localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
}
+ // authentication (OAuth2) required
+ // oauth required
+ if (!localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
+ {
+ if (!string.IsNullOrEmpty(this.Configuration.AccessToken))
+ {
+ localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
+ }
+ else if (!string.IsNullOrEmpty(this.Configuration.OAuthTokenUrl) &&
+ !string.IsNullOrEmpty(this.Configuration.OAuthClientId) &&
+ !string.IsNullOrEmpty(this.Configuration.OAuthClientSecret) &&
+ this.Configuration.OAuthFlow != null)
+ {
+ localVarRequestOptions.OAuth = true;
+ }
+ }
// make the HTTP request
var localVarResponse = await this.AsynchronousClient.GetAsync>("/accounts/{accountId}/calls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
@@ -1117,6 +1214,22 @@ public Bandwidth.Standard.Client.ApiResponse