Skip to content

Repository files navigation

bandwidth-sdk

Bandwidth

  • API version: 1.0.0
    • Generator version: 7.24.0

Bandwidth's Communication APIs

For more information, please visit https://dev.bandwidth.com

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

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.

Maven users

Add this dependency to your project's POM:

<dependency>
<groupId>com.bandwidth.sdk</groupId>
<artifactId>bandwidth-sdk</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>

Gradle users

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"
}

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/bandwidth-sdk-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:importcom.bandwidth.sdk.ApiClient;
importcom.bandwidth.sdk.ApiException;
importcom.bandwidth.sdk.Configuration;
importcom.bandwidth.sdk.auth.*;
importcom.bandwidth.sdk.model.*;
importcom.bandwidth.sdk.api.CallsApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
// Configure HTTP basic authorization: BasicHttpBasicAuthBasic = (HttpBasicAuth) defaultClient.getAuthentication("Basic");
Basic.setUsername("YOUR USERNAME");
Basic.setPassword("YOUR PASSWORD");
// Configure OAuth2 access token for authorization: OAuth2OAuthOAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
CallsApiapiInstance = newCallsApi(defaultClient);
// Or create the instance with a your clientId and clientSecret (for OAuth2):// CallsApi apiInstance = new CallsApi("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET", null);StringaccountId = "9900000"; // String | Your Bandwidth Account ID.CreateCallcreateCall = newCreateCall(); // CreateCall | JSON object containing information to create an outbound calltry {
CreateCallResponseresult = apiInstance.createCall(accountId, createCall);
System.out.println(result);
} catch (ApiExceptione) {
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();
}
}
}

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
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
MfaApigenerateMessagingCodePOST /accounts/{accountId}/code/messagingMessaging Authentication Code
MfaApigenerateVoiceCodePOST /accounts/{accountId}/code/voiceVoice Authentication Code
MfaApiverifyCodePOST /accounts/{accountId}/code/verifyVerify Authentication Code
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

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes: N/A

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

letstalk@bandwidth.com

About

Bandwidth Java SDK

Topics

Resources

Stars

7 stars

Watchers

34 watching

Forks

Releases

Packages

Used by

Contributors

Languages