Bandwidth
- API version: 1.0.0
- Generator version: 7.10.0
Bandwidth's Communication APIs
For more information, please visit https://dev.bandwidth.com
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.bandwidth.sdk</groupId>
<artifactId>bandwidth-sdk</artifactId>
<version>1.0.0-dev</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'bandwidth-sdk' jar has been published to maven central.
mavenLocal() // Needed if the 'bandwidth-sdk' jar has been published to the local maven repo.
}
dependencies {
implementation "com.bandwidth.sdk:bandwidth-sdk:1.0.0-dev"
}
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/bandwidth-sdk-1.0.0-dev.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes:
import com.bandwidth.sdk.ApiClient;
import com.bandwidth.sdk.ApiException;
import com.bandwidth.sdk.Configuration;
import com.bandwidth.sdk.auth.*;
import com.bandwidth.sdk.model.*;
import com.bandwidth.sdk.api.CallsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure HTTP basic authorization: Basic
HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
CallsApi apiInstance = new CallsApi(defaultClient);
String accountId = "9900000"; // String | Your Bandwidth Account ID.
CreateCall createCall = new CreateCall(); // CreateCall | JSON object containing information to create an outbound call
try {
CreateCallResponse result = apiInstance.createCall(accountId, createCall);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CallsApi#createCall");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
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 |
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 |
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 |
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 |
- AccountStatistics
- AnswerCallback
- BridgeCompleteCallback
- BridgeTargetCompleteCallback
- CallDirectionEnum
- CallRecordingMetadata
- CallState
- CallStateEnum
- CallTranscription
- CallTranscriptionDetectedLanguageEnum
- CallTranscriptionMetadata
- CallTranscriptionResponse
- CallTranscriptionTrackEnum
- CallbackMethodEnum
- CodeRequest
- Conference
- ConferenceCompletedCallback
- ConferenceCreatedCallback
- ConferenceMember
- ConferenceMemberExitCallback
- ConferenceMemberJoinCallback
- ConferenceRecordingAvailableCallback
- ConferenceRecordingMetadata
- ConferenceRedirectCallback
- ConferenceStateEnum
- CreateCall
- CreateCallResponse
- CreateLookupResponse
- CreateMessageRequestError
- DeferredResult
- DisconnectCallback
- Diversion
- DtmfCallback
- FieldError
- FileFormatEnum
- GatherCallback
- InboundMessageCallback
- InboundMessageCallbackMessage
- InitiateCallback
- ListMessageDirectionEnum
- ListMessageItem
- LookupRequest
- LookupResult
- LookupStatus
- LookupStatusEnum
- MachineDetectionCompleteCallback
- MachineDetectionConfiguration
- MachineDetectionModeEnum
- MachineDetectionResult
- Media
- Message
- MessageDeliveredCallback
- MessageDeliveredCallbackMessage
- MessageDirectionEnum
- MessageFailedCallback
- MessageFailedCallbackMessage
- MessageRequest
- MessageSendingCallback
- MessageSendingCallbackMessage
- MessageStatusEnum
- MessageTypeEnum
- MessagesList
- MessagingCodeResponse
- MessagingRequestError
- MfaForbiddenRequestError
- MfaRequestError
- MfaUnauthorizedRequestError
- PageInfo
- PriorityEnum
- RecordingAvailableCallback
- RecordingCompleteCallback
- RecordingStateEnum
- RecordingTranscriptionMetadata
- RecordingTranscriptions
- RedirectCallback
- RedirectMethodEnum
- StirShaken
- Tag
- TnLookupRequestError
- TranscribeRecording
- Transcription
- TranscriptionAvailableCallback
- TransferAnswerCallback
- TransferCompleteCallback
- TransferDisconnectCallback
- UpdateCall
- UpdateCallRecording
- UpdateConference
- UpdateConferenceMember
- VerifyCodeRequest
- VerifyCodeResponse
- VoiceApiError
- VoiceCodeResponse
Authentication schemes defined for the API:
- Type: HTTP basic authentication
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.