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 plivofrom vobiz import Vobiz (Python) / @vobiz/sdk (Node)
Client classplivo.RestClient(auth_id, auth_token)Vobiz(api_key=AUTH_ID, auth_token=AUTH_TOKEN) (Python) / new VobizClient({ apiKey, authToken }) (Node)
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 Vobiz client takes the Auth ID as api_key and the Auth Token as auth_token (these map to the X-Auth-ID / X-Auth-Token headers). Unlike Plivo’s RestClient, pass the credentials explicitly when constructing the client.
  • 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.
import os

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

# After (Vobiz)
from vobiz import Vobiz
client = Vobiz(
    api_key=os.environ["VOBIZ_AUTH_ID"],       # your Auth ID  -> X-Auth-ID
    auth_token=os.environ["VOBIZ_AUTH_TOKEN"], # your Auth Token -> X-Auth-Token
)
// Before (Plivo)
const plivo = require('plivo');
const client = new plivo.Client(); // reads PLIVO_AUTH_ID / PLIVO_AUTH_TOKEN

// After (Vobiz)
import { VobizClient } from '@vobiz/sdk';
const client = new VobizClient({
  apiKey: process.env.VOBIZ_AUTH_ID,       // your Auth ID  -> X-Auth-ID
  authToken: process.env.VOBIZ_AUTH_TOKEN, // your Auth Token -> X-Auth-Token
});
# Before (Plivo) - set your credentials
export PLIVO_AUTH_ID=XXXXXXXXXXXXXXXXXXXX
export PLIVO_AUTH_TOKEN=your_token_here

# After (Vobiz) - note the MA_ / SA_ prefix on the auth ID
export VOBIZ_AUTH_ID=MA_XXXXXXXXXX
export VOBIZ_AUTH_TOKEN=your_token_here

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"},
)
// Before (Plivo) - HTTP Basic auth
const authId = process.env.PLIVO_AUTH_ID;
const authToken = process.env.PLIVO_AUTH_TOKEN;
const basic = Buffer.from(`${authId}:${authToken}`).toString('base64');

await fetch(`https://api.plivo.com/v1/Account/${authId}/Call/`, {
  method: 'POST',
  headers: {
    Authorization: `Basic ${basic}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ from: '+911234567890', to: '+919876543210' }),
});

// After (Vobiz) - X-Auth-ID / X-Auth-Token headers
const vAuthId = process.env.VOBIZ_AUTH_ID; // e.g. MA_XXXXXXXXXX
const vAuthToken = process.env.VOBIZ_AUTH_TOKEN;

await fetch(`https://api.vobiz.ai/api/v1/Account/${vAuthId}/Call/`, {
  method: 'POST',
  headers: {
    'X-Auth-ID': vAuthId,
    'X-Auth-Token': vAuthToken,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ from: '+911234567890', to: '+919876543210' }),
});
# Before (Plivo) - HTTP Basic auth
curl -X POST \
  "https://api.plivo.com/v1/Account/$PLIVO_AUTH_ID/Call/" \
  -u "$PLIVO_AUTH_ID:$PLIVO_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"from": "+911234567890", "to": "+919876543210"}'

# After (Vobiz) - X-Auth-ID / X-Auth-Token headers
curl -X POST \
  "https://api.vobiz.ai/api/v1/Account/$VOBIZ_AUTH_ID/Call/" \
  -H "X-Auth-ID: $VOBIZ_AUTH_ID" \
  -H "X-Auth-Token: $VOBIZ_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"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.