Authentication

    All requests to Plivo API are authenticated with BasicAuth using your AUTH ID and AUTH TOKEN. Your Plivo AUTH ID and AUTH TOKEN can be found when you login to your dashboard.

    Example Request

    1
    2
    3
    
    import plivo
    
    client = plivo.RestClient()
    
    1
    2
    3
    4
    5
    6
    
    require "rubygems"
    require "plivo"
    
    include Plivo
    
    api = RestClient.new
    
    1
    2
    
    let plivo = require('plivo');
    let client = new plivo.Client();
    
    1
    2
    3
    4
    5
    
    <?php
    require 'vendor/autoload.php';
    use Plivo\RestClient;
    
    $client = new RestClient();
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    package com.plivo.api.samples.application;
    
    import com.plivo.api.Plivo;
    
    class AutheExample {
      public static void main(String [] args) {
        Plivo.init();
      }
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    
    using System;
    using System.Collections.Generic;
    using Plivo;
    using Plivo.Exception;
    
    namespace PlivoExamples
    {
        internal class Program
        {
            public static void Main(string[] args)
            {
                var api = new PlivoApi("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
            }
        }
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    
    package main
    
    import "github.com/plivo/plivo-go"
    
    func main()  {
      client, err := plivo.NewClient("", "", &plivo.ClientOptions{})
      if err != nil {
        panic(err)
      }
    }