Vonage Account Package
This package contains the code to use Vonage's Account API in Python.
It includes methods for managing Vonage accounts, managing account secrets and querying country pricing.
Usage
It is recommended to use this as part of the main vonage package. The examples below assume you've created an instance of the vonage.Vonage class called vonage_client.
Get Account Balance
balance = vonage_client.account.get_balance()
print(balance)
Top-Up Account
response = vonage_client.account.top_up(trx='1234567890')
print(response)
Get Service Pricing for a Specific Country
from vonage_account import GetCountryPricingRequest
response = vonage_client.account.get_country_pricing(
GetCountryPricingRequest(type='sms', country_code='US')
)
print(response)
Get Service Pricing for All Countries
response = vonage_client.account.get_all_countries_pricing(service_type='sms')
print(response)
Get Service Pricing by Dialing Prefix
from vonage_account import GetPrefixPricingRequest
response = client.account.get_prefix_pricing(
GetPrefixPricingRequest(prefix='44', type='sms')
)
print(response)
Update the Default SMS Webhook
This will return a Pydantic object (SettingsResponse) containing multiple settings for your account.
settings: SettingsResponse = vonage_client.account.update_default_sms_webhook(
mo_callback_url='https://example.com/inbound_sms_webhook',
dr_callback_url='https://example.com/delivery_receipt_webhook',
)
print(settings)
List Secrets Associated with the Account
response = vonage_client.account.list_secrets()
print(response)
Create a New Account Secret
secret = vonage_client.account.create_secret('Mytestsecret12345')
print(secret)
Get Information About One Secret
secret = vonage_client.account.get_secret(MY_SECRET_ID)
print(secret)
Revoke a Secret
Note: it isn't possible to revoke all account secrets, there must always be one valid secret. Attempting to do so will give a 403 error.
client.account.revoke_secret(MY_SECRET_ID)
Metadata
Release files for vonage-account 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vonage_account-1.1.2.tar.gz | 6.6 kB | Without provenance | Details for vonage_account-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vonage_account-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for vonage_account-1.1.2-py3-none-any.whl |
Total release size: 13.3 kB
Release files / vonage_account-1.1.2.tar.gz
| Download URL | vonage_account-1.1.2.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35bd195538f7a892f662eeade7660bb4b7c8e1eda5d98690d3a532e3f6ff683c
|
|
BLAKE2b-256 checksum How to use checksums |
bd1e220e49767f3f8521e32024d72a3b03425997de06ea98b82f1df7bb49d5f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.3
|
Release files / vonage_account-1.1.2-py3-none-any.whl
| Download URL | vonage_account-1.1.2-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e12c248a276813bb54aa269f00029ab3493ae4aff606794fba58499be97f270
|
|
BLAKE2b-256 checksum How to use checksums |
2a6156e8963f879001618044585f0059218984c727e6295e54b45a5531481644
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.3
|
Security for vonage-account 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.