Skip to content

Repository files navigation

Bandwidth.Standard - the C# library for the Bandwidth

Bandwidth's Communication APIs

This C# SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • SDK version: 1.0.0
  • Generator version: 7.7.0
  • Build package: org.openapitools.codegen.languages.CSharpClientCodegen For more information, please visit https://dev.bandwidth.com

Frameworks supported

  • .NET Core >=1.0
  • .NET Framework >=4.6
  • Mono/Xamarin >=vNext

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.

Installation

Generate the DLL using your preferred tool (e.g. dotnet build)

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

usingBandwidth.Standard.Api;usingBandwidth.Standard.Client;usingBandwidth.Standard.Model;

Usage

To use the API client with a HTTP proxy, setup a System.Net.WebProxy

Configurationc=newConfiguration();System.Net.WebProxywebProxy=newSystem.Net.WebProxy("http://myProxyUrl:80/");webProxy.Credentials=System.Net.CredentialCache.DefaultCredentials;c.Proxy=webProxy;

Getting Started

usingSystem.Collections.Generic;usingSystem.Diagnostics;usingBandwidth.Standard.Api;usingBandwidth.Standard.Client;usingBandwidth.Standard.Model;namespaceExample{publicclassExample{publicstaticvoidMain(){Configurationconfig=newConfiguration();config.BasePath="http://localhost";// Configure HTTP basic authorization: Basicconfig.Username="YOUR_USERNAME";config.Password="YOUR_PASSWORD";// Configure OAuth2 access token for authorization: OAuth2config.AccessToken="YOUR_ACCESS_TOKEN";// Or use clientId/clientSecret for OAuth2 authorizationconfig.OAuthClientId="YOUR_CLIENT_ID";config.OAuthClientSecret="YOUR_CLIENT_SECRET";varapiInstance=newCallsApi(config);varaccountId=9900000;// string | Your Bandwidth Account ID.varcreateCall=newCreateCall();// CreateCall | JSON object containing information to create an outbound calltry{// Create CallCreateCallResponseresult=apiInstance.CreateCall(accountId,createCall);Debug.WriteLine(result);}catch(ApiExceptione){Debug.Print("Exception when calling CallsApi.CreateCall: "+e.Message);Debug.Print("Status Code: "+e.ErrorCode);Debug.Print(e.StackTrace);}}}}

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
CallsApiCreateCallPOST /accounts/{accountId}/callsCreate Call
CallsApiGetCallStateGET /accounts/{accountId}/calls/{callId}Get Call State Information
CallsApiListCallsGET /accounts/{accountId}/callsGet Calls
CallsApiUpdateCallPOST /accounts/{accountId}/calls/{callId}Update Call
CallsApiUpdateCallBxmlPUT /accounts/{accountId}/calls/{callId}/bxmlUpdate Call BXML
ConferencesApiDownloadConferenceRecordingGET /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/mediaDownload Conference Recording
ConferencesApiGetConferenceGET /accounts/{accountId}/conferences/{conferenceId}Get Conference Information
ConferencesApiGetConferenceMemberGET /accounts/{accountId}/conferences/{conferenceId}/members/{memberId}Get Conference Member
ConferencesApiGetConferenceRecordingGET /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}Get Conference Recording Information
ConferencesApiListConferenceRecordingsGET /accounts/{accountId}/conferences/{conferenceId}/recordingsGet Conference Recordings
ConferencesApiListConferencesGET /accounts/{accountId}/conferencesGet Conferences
ConferencesApiUpdateConferencePOST /accounts/{accountId}/conferences/{conferenceId}Update Conference
ConferencesApiUpdateConferenceBxmlPUT /accounts/{accountId}/conferences/{conferenceId}/bxmlUpdate Conference BXML
ConferencesApiUpdateConferenceMemberPUT /accounts/{accountId}/conferences/{conferenceId}/members/{memberId}Update Conference Member
EndpointsApiCreateEndpointPOST /accounts/{accountId}/endpointsCreate Endpoint
EndpointsApiDeleteEndpointDELETE /accounts/{accountId}/endpoints/{endpointId}Delete Endpoint
EndpointsApiGetEndpointGET /accounts/{accountId}/endpoints/{endpointId}Get Endpoint
EndpointsApiListEndpointsGET /accounts/{accountId}/endpointsList Endpoints
EndpointsApiUpdateEndpointBxmlPUT /accounts/{accountId}/endpoints/{endpointId}/bxmlUpdate Endpoint BXML
MFAApiGenerateMessagingCodePOST /accounts/{accountId}/code/messagingMessaging Authentication Code
MFAApiGenerateVoiceCodePOST /accounts/{accountId}/code/voiceVoice Authentication Code
MFAApiVerifyCodePOST /accounts/{accountId}/code/verifyVerify Authentication Code
MediaApiDeleteMediaDELETE /users/{accountId}/media/{mediaId}Delete Media
MediaApiGetMediaGET /users/{accountId}/media/{mediaId}Get Media
MediaApiListMediaGET /users/{accountId}/mediaList Media
MediaApiUploadMediaPUT /users/{accountId}/media/{mediaId}Upload Media
MessagesApiCreateMessagePOST /users/{accountId}/messagesCreate Message
MessagesApiListMessagesGET /users/{accountId}/messagesList Messages
MultiChannelApiCreateMultiChannelMessagePOST /users/{accountId}/messages/multiChannelCreate Multi-Channel Message
PhoneNumberLookupApiCreateAsyncBulkLookupPOST /accounts/{accountId}/phoneNumberLookup/bulkCreate Asynchronous Bulk Number Lookup
PhoneNumberLookupApiCreateSyncLookupPOST /accounts/{accountId}/phoneNumberLookupCreate Synchronous Number Lookup
PhoneNumberLookupApiGetAsyncBulkLookupGET /accounts/{accountId}/phoneNumberLookup/bulk/{requestId}Get Asynchronous Bulk Number Lookup
RecordingsApiDeleteRecordingDELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}Delete Recording
RecordingsApiDeleteRecordingMediaDELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/mediaDelete Recording Media
RecordingsApiDeleteRecordingTranscriptionDELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcriptionDelete Transcription
RecordingsApiDownloadCallRecordingGET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/mediaDownload Recording
RecordingsApiGetCallRecordingGET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}Get Call Recording
RecordingsApiGetRecordingTranscriptionGET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcriptionGet Transcription
RecordingsApiListAccountCallRecordingsGET /accounts/{accountId}/recordingsGet Call Recordings
RecordingsApiListCallRecordingsGET /accounts/{accountId}/calls/{callId}/recordingsList Call Recordings
RecordingsApiTranscribeCallRecordingPOST /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcriptionCreate Transcription Request
RecordingsApiUpdateCallRecordingStatePUT /accounts/{accountId}/calls/{callId}/recordingUpdate Recording
StatisticsApiGetStatisticsGET /accounts/{accountId}/statisticsGet Account Statistics
TollFreeVerificationApiCreateWebhookSubscriptionPOST /accounts/{accountId}/tollFreeVerification/webhooks/subscriptionsCreate Webhook Subscription
TollFreeVerificationApiDeleteVerificationRequestDELETE /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerificationDelete a Toll-Free Verification Submission
TollFreeVerificationApiDeleteWebhookSubscriptionDELETE /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}Delete Webhook Subscription
TollFreeVerificationApiGetTollFreeVerificationStatusGET /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerificationGet Toll-Free Verification Status
TollFreeVerificationApiListTollFreeUseCasesGET /tollFreeVerification/useCasesList Toll-Free Use Cases
TollFreeVerificationApiListWebhookSubscriptionsGET /accounts/{accountId}/tollFreeVerification/webhooks/subscriptionsList Webhook Subscriptions
TollFreeVerificationApiRequestTollFreeVerificationPOST /accounts/{accountId}/tollFreeVerificationRequest Toll-Free Verification
TollFreeVerificationApiUpdateTollFreeVerificationRequestPUT /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerificationUpdate Toll-Free Verification Request
TollFreeVerificationApiUpdateWebhookSubscriptionPUT /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}Update Webhook Subscription
TranscriptionsApiDeleteRealTimeTranscriptionDELETE /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}Delete Real-time Transcription
TranscriptionsApiGetRealTimeTranscriptionGET /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}Get Real-time Transcription
TranscriptionsApiListRealTimeTranscriptionsGET /accounts/{accountId}/calls/{callId}/transcriptionsList Real-time Transcriptions

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

Basic

  • Type: HTTP basic authentication

OAuth2

About

Bandwidth C# SDK

Topics

Resources

Stars

9 stars

Watchers

48 watching

Forks

Releases

Packages

Used by

Contributors

Languages