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
- .NET Core >=1.0
- .NET Framework >=4.6
- Mono/Xamarin >=vNext
- RestSharp - 106.13.0 or later
- Json.NET - 13.0.2 or later
- JsonSubTypes - 1.8.0 or later
- System.ComponentModel.Annotations - 5.0.0 or later
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.
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:
using Bandwidth.Standard.Api;
using Bandwidth.Standard.Client;
using Bandwidth.Standard.Model;
To use the API client with a HTTP proxy, setup a System.Net.WebProxy
Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;
using System.Collections.Generic;
using System.Diagnostics;
using Bandwidth.Standard.Api;
using Bandwidth.Standard.Client;
using Bandwidth.Standard.Model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost";
// Configure HTTP basic authorization: Basic
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new CallsApi(config);
var accountId = 9900000; // string | Your Bandwidth Account ID.
var createCall = new CreateCall(); // CreateCall | JSON object containing information to create an outbound call
try
{
// Create Call
CreateCallResponse result = apiInstance.CreateCall(accountId, createCall);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CallsApi.CreateCall: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
CallsApi | CreateCall | POST /accounts/{accountId}/calls | Create Call |
CallsApi | GetCallState | GET /accounts/{accountId}/calls/{callId} | Get Call State Information |
CallsApi | ListCalls | GET /accounts/{accountId}/calls | Get Calls |
CallsApi | UpdateCall | POST /accounts/{accountId}/calls/{callId} | Update Call |
CallsApi | UpdateCallBxml | PUT /accounts/{accountId}/calls/{callId}/bxml | Update Call BXML |
ConferencesApi | DownloadConferenceRecording | GET /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media | Download Conference Recording |
ConferencesApi | GetConference | GET /accounts/{accountId}/conferences/{conferenceId} | Get Conference Information |
ConferencesApi | GetConferenceMember | GET /accounts/{accountId}/conferences/{conferenceId}/members/{memberId} | Get Conference Member |
ConferencesApi | GetConferenceRecording | GET /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId} | Get Conference Recording Information |
ConferencesApi | ListConferenceRecordings | GET /accounts/{accountId}/conferences/{conferenceId}/recordings | Get Conference Recordings |
ConferencesApi | ListConferences | GET /accounts/{accountId}/conferences | Get Conferences |
ConferencesApi | UpdateConference | POST /accounts/{accountId}/conferences/{conferenceId} | Update Conference |
ConferencesApi | UpdateConferenceBxml | PUT /accounts/{accountId}/conferences/{conferenceId}/bxml | Update Conference BXML |
ConferencesApi | UpdateConferenceMember | PUT /accounts/{accountId}/conferences/{conferenceId}/members/{memberId} | Update Conference Member |
MFAApi | GenerateMessagingCode | POST /accounts/{accountId}/code/messaging | Messaging Authentication Code |
MFAApi | GenerateVoiceCode | POST /accounts/{accountId}/code/voice | Voice Authentication Code |
MFAApi | VerifyCode | POST /accounts/{accountId}/code/verify | Verify Authentication Code |
MediaApi | DeleteMedia | DELETE /users/{accountId}/media/{mediaId} | Delete Media |
MediaApi | GetMedia | GET /users/{accountId}/media/{mediaId} | Get Media |
MediaApi | ListMedia | GET /users/{accountId}/media | List Media |
MediaApi | UploadMedia | PUT /users/{accountId}/media/{mediaId} | Upload Media |
MessagesApi | CreateMessage | POST /users/{accountId}/messages | Create Message |
MessagesApi | ListMessages | GET /users/{accountId}/messages | List Messages |
PhoneNumberLookupApi | CreateLookup | POST /accounts/{accountId}/tnlookup | Create Lookup |
PhoneNumberLookupApi | GetLookupStatus | GET /accounts/{accountId}/tnlookup/{requestId} | Get Lookup Request Status |
RecordingsApi | DeleteRecording | DELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId} | Delete Recording |
RecordingsApi | DeleteRecordingMedia | DELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media | Delete Recording Media |
RecordingsApi | DeleteRecordingTranscription | DELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Delete Transcription |
RecordingsApi | DownloadCallRecording | GET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media | Download Recording |
RecordingsApi | GetCallRecording | GET /accounts/{accountId}/calls/{callId}/recordings/{recordingId} | Get Call Recording |
RecordingsApi | GetRecordingTranscription | GET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Get Transcription |
RecordingsApi | ListAccountCallRecordings | GET /accounts/{accountId}/recordings | Get Call Recordings |
RecordingsApi | ListCallRecordings | GET /accounts/{accountId}/calls/{callId}/recordings | List Call Recordings |
RecordingsApi | TranscribeCallRecording | POST /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Create Transcription Request |
RecordingsApi | UpdateCallRecordingState | PUT /accounts/{accountId}/calls/{callId}/recording | Update Recording |
StatisticsApi | GetStatistics | GET /accounts/{accountId}/statistics | Get Account Statistics |
TranscriptionsApi | DeleteRealTimeTranscription | DELETE /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId} | Delete a specific transcription |
TranscriptionsApi | GetRealTimeTranscription | GET /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId} | Retrieve a specific transcription |
TranscriptionsApi | ListRealTimeTranscriptions | GET /accounts/{accountId}/calls/{callId}/transcriptions | Enumerate transcriptions made with StartTranscription |
- Model.AccountStatistics
- Model.AnswerCallback
- Model.BridgeCompleteCallback
- Model.BridgeTargetCompleteCallback
- Model.CallDirectionEnum
- Model.CallRecordingMetadata
- Model.CallState
- Model.CallStateEnum
- Model.CallTranscription
- Model.CallTranscriptionDetectedLanguageEnum
- Model.CallTranscriptionMetadata
- Model.CallTranscriptionResponse
- Model.CallTranscriptionTrackEnum
- Model.CallbackMethodEnum
- Model.CodeRequest
- Model.Conference
- Model.ConferenceCompletedCallback
- Model.ConferenceCreatedCallback
- Model.ConferenceMember
- Model.ConferenceMemberExitCallback
- Model.ConferenceMemberJoinCallback
- Model.ConferenceRecordingAvailableCallback
- Model.ConferenceRecordingMetadata
- Model.ConferenceRedirectCallback
- Model.ConferenceStateEnum
- Model.CreateCall
- Model.CreateCallResponse
- Model.CreateLookupResponse
- Model.CreateMessageRequestError
- Model.DeferredResult
- Model.DisconnectCallback
- Model.Diversion
- Model.DtmfCallback
- Model.FieldError
- Model.FileFormatEnum
- Model.GatherCallback
- Model.InboundMessageCallback
- Model.InboundMessageCallbackMessage
- Model.InitiateCallback
- Model.ListMessageDirectionEnum
- Model.ListMessageItem
- Model.LookupRequest
- Model.LookupResult
- Model.LookupStatus
- Model.LookupStatusEnum
- Model.MachineDetectionCompleteCallback
- Model.MachineDetectionConfiguration
- Model.MachineDetectionModeEnum
- Model.MachineDetectionResult
- Model.Media
- Model.Message
- Model.MessageDeliveredCallback
- Model.MessageDeliveredCallbackMessage
- Model.MessageDirectionEnum
- Model.MessageFailedCallback
- Model.MessageFailedCallbackMessage
- Model.MessageRequest
- Model.MessageSendingCallback
- Model.MessageSendingCallbackMessage
- Model.MessageStatusEnum
- Model.MessageTypeEnum
- Model.MessagesList
- Model.MessagingCodeResponse
- Model.MessagingRequestError
- Model.MfaForbiddenRequestError
- Model.MfaRequestError
- Model.MfaUnauthorizedRequestError
- Model.PageInfo
- Model.PriorityEnum
- Model.RecordingAvailableCallback
- Model.RecordingCompleteCallback
- Model.RecordingStateEnum
- Model.RecordingTranscriptionMetadata
- Model.RecordingTranscriptions
- Model.RedirectCallback
- Model.RedirectMethodEnum
- Model.StirShaken
- Model.Tag
- Model.TnLookupRequestError
- Model.TranscribeRecording
- Model.Transcription
- Model.TranscriptionAvailableCallback
- Model.TransferAnswerCallback
- Model.TransferCompleteCallback
- Model.TransferDisconnectCallback
- Model.UpdateCall
- Model.UpdateCallRecording
- Model.UpdateConference
- Model.UpdateConferenceMember
- Model.VerifyCodeRequest
- Model.VerifyCodeResponse
- Model.VoiceApiError
- Model.VoiceCodeResponse
Authentication schemes defined for the API:
- Type: HTTP basic authentication