Skip to main content
If you already call Plivo, the move to Vobiz starts with two things: how you authenticate and where you send requests. This page covers both. Everything else - the call, recording, and account endpoints - is covered in Endpoint mapping. The good news: the Vobiz SDK mirrors the Plivo SDK closely. You swap the package name, repoint your credentials, and most of your code keeps working. For raw HTTP, the only real change is how credentials are passed in headers.

What changes

ConceptPlivoVobiz
SDK packageimport plivoimport vobiz
Client classplivo.RestClient(auth_id, auth_token)vobiz.RestClient(auth_id, auth_token)
Env varsPLIVO_AUTH_ID, PLIVO_AUTH_TOKENVOBIZ_AUTH_ID, VOBIZ_AUTH_TOKEN
Raw HTTP authHTTP Basic (auth_id:auth_token)X-Auth-ID + X-Auth-Token headers
Base URLhttps://api.plivo.com/v1https://api.vobiz.ai/api/v1
Resource path/Account/{auth_id}/Call//Account/{auth_id}/Call/ (unchanged)
A few notes on the table:
  • The RestClient constructor signature is identical, so swapping plivo for vobiz is a drop-in change. Both SDKs read credentials from the environment when you omit them.
  • Vobiz auth IDs are prefixed: MA_ for a master account and SA_ for a sub-account. Use the full prefixed value wherever you previously used a Plivo auth ID.
  • The resource path keeps Plivo’s PascalCase and trailing slash (/Account/{auth_id}/Call/). Only the host and version prefix change.

SDK client init

Swap the package and your environment variables. The client object behaves the same way afterward.
# Before (Plivo)
import plivo

client = plivo.RestClient()  # reads PLIVO_AUTH_ID / PLIVO_AUTH_TOKEN

# After (Vobiz)
import vobiz

client = vobiz.RestClient()  # reads VOBIZ_AUTH_ID / VOBIZ_AUTH_TOKEN

# Or pass credentials explicitly
client = vobiz.RestClient(auth_id="MA_XXXXXXXXXX", auth_token="your_token")

Raw HTTP request

Plivo authenticates over HTTP Basic auth, passing auth_id:auth_token. Vobiz instead expects two dedicated headers - X-Auth-ID and X-Auth-Token - alongside Content-Type: application/json. The host and version prefix change; the resource path does not.
import os
import requests

# Before (Plivo) - HTTP Basic auth
auth_id = os.environ["PLIVO_AUTH_ID"]
auth_token = os.environ["PLIVO_AUTH_TOKEN"]
url = f"https://api.plivo.com/v1/Account/{auth_id}/Call/"

resp = requests.post(
    url,
    auth=(auth_id, auth_token),
    json={"from": "+911234567890", "to": "+919876543210"},
)

# After (Vobiz) - X-Auth-ID / X-Auth-Token headers
auth_id = os.environ["VOBIZ_AUTH_ID"]      # e.g. MA_XXXXXXXXXX
auth_token = os.environ["VOBIZ_AUTH_TOKEN"]
url = f"https://api.vobiz.ai/api/v1/Account/{auth_id}/Call/"

resp = requests.post(
    url,
    headers={
        "X-Auth-ID": auth_id,
        "X-Auth-Token": auth_token,
        "Content-Type": "application/json",
    },
    json={"from": "+911234567890", "to": "+919876543210"},
)
The request body and the calls.create(...) signature itself do not change as part of authentication. Parameter-level differences (field names, supported options) are covered in Endpoint mapping.

Reference

Next

Endpoint mapping

Map Plivo call, recording, and account endpoints to their Vobiz equivalents.

Back to migration guide

Return to the Plivo to Vobiz migration overview.