nvoip-python
SDK e exemplos oficiais da Nvoip para integrar a API v3 com OAuth, chamadas, OTP, WhatsApp, SMS e saldo em Python.
Migração para v3
Esta é uma quebra de compatibilidade: use create_client_credentials_token() com credenciais OAuth e envie o access token RS256 em Authorization: Bearer. O SDK usa https://api.nvoip.com.br/auth/oauth2/token; não use napikey, password grant ou /v3/oauth/token. Para SMS de texto livre, valide antes a política e o template aprovado aplicáveis à sua conta.
Requisitos
- Python 3.10+
Instalacao
pip install nvoip
Configuracao
export NVOIP_OAUTH_CLIENT_ID="seu_numbersip"
export NVOIP_OAUTH_CLIENT_SECRET="seu_client_secret"
export NVOIP_OAUTH_CLIENT_ID="seu_client_id"
export NVOIP_OAUTH_CLIENT_SECRET="seu_client_secret"
export NVOIP_CALLER="1049"
export NVOIP_TARGET_NUMBER="11999999999"
Fluxos cobertos
- gerar
access_token - renovar token
- consultar saldo
- enviar SMS
- realizar chamada
- enviar OTP
- validar OTP
- listar templates de WhatsApp
- enviar template de WhatsApp
Exemplos
python3 examples/create_client_credentials_token.pypython3 examples/get_balance.pypython3 examples/create_call.pypython3 examples/send_sms.pypython3 examples/send_otp.pypython3 examples/check_otp.pypython3 examples/list_whatsapp_templates.pypython3 examples/send_whatsapp_template.py
Destinatário WhatsApp
O exemplo mantém NVOIP_WA_DESTINATION para telefone. Para o contrato tipado,
use NVOIP_WA_RECIPIENT_TYPE=phone|bsuid|parent_bsuid e
NVOIP_WA_RECIPIENT_VALUE, sem destination. BSUID é opaco; não use
@username nem o coloque em campo de telefone. Exemplos mascarados:
US.MASKED_BSUID_001 e PARENT.MASKED_BSUID_001.
SDK web
Para o fluxo de popup com telefone e codigo, use o repositório nvoip-web-sdk. Este repo cobre o consumo server-side da API.
Links oficiais
Metadata
Release files for nvoip 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nvoip-3.0.0.tar.gz | 19.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nvoip-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.0 kB
Release files / nvoip-3.0.0.tar.gz
| Download URL | nvoip-3.0.0.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b33eca2cd29dd419e216317c0b7771179e24d2f01e7b5c8ecd48ec71d89c9acb
|
|
BLAKE2b-256 checksum How to use checksums |
3e5e4c3706665d45fbf42ba7a9081326014791ea43dd36105404ee9655a9b9e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logRelease files / nvoip-3.0.0-py3-none-any.whl
| Download URL | nvoip-3.0.0-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87ce4f809a3615c36c7218a44e3ab110bd351d933a1561b6264a9b553d46fce1
|
|
BLAKE2b-256 checksum How to use checksums |
f1d5e0806abb51e9bb9dd06aa0f1543ae63cf777a78cfac6ed119696cbfcdb49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency log