Skip to content

Bandwidth/python-sdk

Repository files navigation

bandwidth_sdk

Bandwidth's Communication APIs

This Python package is automatically generated by the OpenAPI Generator project:

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

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/bandwidth/python-sdk.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/bandwidth/python-sdk.git)

Then import the package:

importbandwidth

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

importbandwidth

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

importbandwidthfrombandwidth.restimportApiExceptionfrompprintimportpprint# Defining the host is optional and defaults to http://localhost# See configuration.py for a list of all supported configuration parameters.configuration=bandwidth.Configuration( host="http://localhost" ) # The client must configure the authentication and authorization parameters# in accordance with the API server security policy.# Examples for each auth method are provided below, use the example that# satisfies your auth use case.# Configure HTTP basic authorization: Basicconfiguration=bandwidth.Configuration( username=os.environ["USERNAME"], password=os.environ["PASSWORD"] ) # Configure your client ID and secret for OAuthconfiguration=bandwidth.Configuration( client_id=os.environ["CLIENT_ID"], client_secret=os.environ["CLIENT_SECRET"] ) # Enter a context with an instance of the API clientwithbandwidth.ApiClient(configuration) asapi_client: # Create an instance of the API classapi_instance=bandwidth.CallsApi(api_client) account_id='9900000'# str | Your Bandwidth Account ID.create_call=bandwidth.CreateCall() # CreateCall | JSON object containing information to create an outbound calltry: # Create Callapi_response=api_instance.create_call(account_id, create_call) print("The response of CallsApi->create_call:\n") pprint(api_response) exceptApiExceptionase: print("Exception when calling CallsApi->create_call: %s\n"%e)

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
CallsApicreate_callPOST /accounts/{accountId}/callsCreate Call
CallsApiget_call_stateGET /accounts/{accountId}/calls/{callId}Get Call State Information
CallsApilist_callsGET /accounts/{accountId}/callsGet Calls
CallsApiupdate_callPOST /accounts/{accountId}/calls/{callId}Update Call
CallsApiupdate_call_bxmlPUT /accounts/{accountId}/calls/{callId}/bxmlUpdate Call BXML
ConferencesApidownload_conference_recordingGET /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/mediaDownload Conference Recording
ConferencesApiget_conferenceGET /accounts/{accountId}/conferences/{conferenceId}Get Conference Information
ConferencesApiget_conference_memberGET /accounts/{accountId}/conferences/{conferenceId}/members/{memberId}Get Conference Member
ConferencesApiget_conference_recordingGET /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}Get Conference Recording Information
ConferencesApilist_conference_recordingsGET /accounts/{accountId}/conferences/{conferenceId}/recordingsGet Conference Recordings
ConferencesApilist_conferencesGET /accounts/{accountId}/conferencesGet Conferences
ConferencesApiupdate_conferencePOST /accounts/{accountId}/conferences/{conferenceId}Update Conference
ConferencesApiupdate_conference_bxmlPUT /accounts/{accountId}/conferences/{conferenceId}/bxmlUpdate Conference BXML
ConferencesApiupdate_conference_memberPUT /accounts/{accountId}/conferences/{conferenceId}/members/{memberId}Update Conference Member
MFAApigenerate_messaging_codePOST /accounts/{accountId}/code/messagingMessaging Authentication Code
MFAApigenerate_voice_codePOST /accounts/{accountId}/code/voiceVoice Authentication Code
MFAApiverify_codePOST /accounts/{accountId}/code/verifyVerify Authentication Code
MediaApidelete_mediaDELETE /users/{accountId}/media/{mediaId}Delete Media
MediaApiget_mediaGET /users/{accountId}/media/{mediaId}Get Media
MediaApilist_mediaGET /users/{accountId}/mediaList Media
MediaApiupload_mediaPUT /users/{accountId}/media/{mediaId}Upload Media
MessagesApicreate_messagePOST /users/{accountId}/messagesCreate Message
MessagesApilist_messagesGET /users/{accountId}/messagesList Messages
MultiChannelApicreate_multi_channel_messagePOST /users/{accountId}/messages/multiChannelCreate Multi-Channel Message
PhoneNumberLookupApicreate_async_bulk_lookupPOST /accounts/{accountId}/phoneNumberLookup/bulkCreate Asynchronous Bulk Number Lookup
PhoneNumberLookupApicreate_sync_lookupPOST /accounts/{accountId}/phoneNumberLookupCreate Synchronous Number Lookup
PhoneNumberLookupApiget_async_bulk_lookupGET /accounts/{accountId}/phoneNumberLookup/bulk/{requestId}Get Asynchronous Bulk Number Lookup
RecordingsApidelete_recordingDELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}Delete Recording
RecordingsApidelete_recording_mediaDELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/mediaDelete Recording Media
RecordingsApidelete_recording_transcriptionDELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcriptionDelete Transcription
RecordingsApidownload_call_recordingGET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/mediaDownload Recording
RecordingsApiget_call_recordingGET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}Get Call Recording
RecordingsApiget_recording_transcriptionGET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcriptionGet Transcription
RecordingsApilist_account_call_recordingsGET /accounts/{accountId}/recordingsGet Call Recordings
RecordingsApilist_call_recordingsGET /accounts/{accountId}/calls/{callId}/recordingsList Call Recordings
RecordingsApitranscribe_call_recordingPOST /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcriptionCreate Transcription Request
RecordingsApiupdate_call_recording_statePUT /accounts/{accountId}/calls/{callId}/recordingUpdate Recording
StatisticsApiget_statisticsGET /accounts/{accountId}/statisticsGet Account Statistics
TollFreeVerificationApicreate_webhook_subscriptionPOST /accounts/{accountId}/tollFreeVerification/webhooks/subscriptionsCreate Webhook Subscription
TollFreeVerificationApidelete_verification_requestDELETE /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerificationDelete a Toll-Free Verification Submission
TollFreeVerificationApidelete_webhook_subscriptionDELETE /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}Delete Webhook Subscription
TollFreeVerificationApiget_toll_free_verification_statusGET /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerificationGet Toll-Free Verification Status
TollFreeVerificationApilist_toll_free_use_casesGET /tollFreeVerification/useCasesList Toll-Free Use Cases
TollFreeVerificationApilist_webhook_subscriptionsGET /accounts/{accountId}/tollFreeVerification/webhooks/subscriptionsList Webhook Subscriptions
TollFreeVerificationApirequest_toll_free_verificationPOST /accounts/{accountId}/tollFreeVerificationRequest Toll-Free Verification
TollFreeVerificationApiupdate_toll_free_verification_requestPUT /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerificationUpdate Toll-Free Verification Request
TollFreeVerificationApiupdate_webhook_subscriptionPUT /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}Update Webhook Subscription
TranscriptionsApidelete_real_time_transcriptionDELETE /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}Delete Real-time Transcription
TranscriptionsApiget_real_time_transcriptionGET /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}Get Real-time Transcription
TranscriptionsApilist_real_time_transcriptionsGET /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

Author

[email protected]

About

Bandwidth Python SDK

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 18