Skip to main content

nvoip-python

CI PyPI Nvoip API v3 Docs Postman Stack License: GPL-3.0

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.py
  • python3 examples/get_balance.py
  • python3 examples/create_call.py
  • python3 examples/send_sms.py
  • python3 examples/send_otp.py
  • python3 examples/check_otp.py
  • python3 examples/list_whatsapp_templates.py
  • python3 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.

Metadata

Release files for nvoip 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nvoip 3.0.1
File Size Uploaded
nvoip-3.0.1.tar.gz 19.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nvoip 3.0.1
File Interpreter ABI Platform
nvoip-3.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 42.1 kB

Release files / nvoip-3.0.1.tar.gz

Download URL nvoip-3.0.1.tar.gz
Size 19.9 kB
Tags Source
SHA-256 checksum
How to use checksums
60cd9f836790ca489dd0491a3e7938fccf87983968fe326d5dad8c1be2a48ce2
BLAKE2b-256 checksum
How to use checksums
34849ceb53a315419ece3f465bc135e854123a3fd7b309a3766681ce3951ba2d
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

Release files / nvoip-3.0.1-py3-none-any.whl

Download URL nvoip-3.0.1-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
090d083d47c270ac9c3902bad263eedc0daf70f517c1629f3eda19166ad1c1f8
BLAKE2b-256 checksum
How to use checksums
2d2c128e8bf63a5218baa9e654ed13e19304333f587435b8eb912b209085245f
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

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files

3.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page