Retrieve a PHLO

API Endpoint

GET https://phlorunner.plivo.com/v1/phlo/{phlo_id}

Arguments

URL Params

Param Description/Allowed Values
phlo_idRequiredstring

Unique identifier for the PHLO. PHLO ID is available here.

Payload

No arguments need to be passed.

Returns

Returns a PHLO object.

Response

HTTP Status Code: 200

{
    "api_id": "e4202a42-0419-43db-9889-c440d3167796",
    "phlo_id": "4c1a9f23-7f56-4879-bb80-db856e1e7701",
    "name": "SMS Notifications",
    "created_on": "2019-01-30 09:20:08.617883+00:00"
}

Example Request

1
2
3
4
5
6
7
8
import plivo

auth_id = 'Your AUTH ID'
auth_token = 'Your AUTH Token'
phlo_id = 'Your PHLO ID' # https://console.plivo.com/phlo/list/
phlo_client = plivo.phlo.RestClient(auth_id=auth_id, auth_token=auth_token)
response = phlo_client.phlo.get(phlo_id)
print str(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'rubygems'
require 'plivo'

include Plivo

AUTH_ID = 'AUTH_ID'
AUTH_TOKEN = 'AUTH_TOKEN'

client = Phlo.new(AUTH_ID, AUTH_TOKEN)

# if credentials are stored in the PLIVO_AUTH_ID and the PLIVO_AUTH_TOKEN environment variables
# then initialize client as:
# client = Phlo.new

# provide the phlo_id in params
begin
    phlo = client.phlo.get('phlo_id')
    puts phlo
  rescue PlivoRESTError => e
    puts 'Exception: ' + e.message
  end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var plivo = require('plivo');
var PhloClient = plivo.PhloClient;

var authId = 'auth-id';
var authToken = 'auth-token';
var phloId = 'PHLO_ID';
var phloClient = phlo = null;

//Get Phlo details by phlo id
phloClient = new PhloClient(authId, authToken);
phloClient.phlo.get(phloId).then(function (result) {
    console.log('phlo details =>', result);
}).catch(function (err) {
    console.log('Failed to fetch phlo details', err);
});;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
/**
 * Example for API Request
 */
require 'vendor/autoload.php';
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new PhloRestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
try {
    $response = $client->phlo->getPhlo("YOUR_PHLO_ID");
    print_r($response);
} catch (PlivoRestException $ex) {
    print_r($ex);
}
?>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import com.plivo.api.Plivo;
import com.plivo.api.PlivoClient;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.phlo.Phlo;
import java.io.IOException;

public class Example
{
    private static final String authId = "Your AUTH ID";
    private static final String authToken = "Your AUTH Token";
    private static PlivoClient client = new PlivoClient(authId, authToken);
    public static void main(String[] args) throws IOException, PlivoRestException
    {
        String phloId = "Your PHLO ID";
        Plivo.init(authId, authToken);
        Phlo phlo = Phlo.getter(phloId).client(client).get();
        Map<String, Object> payload = new HashMap<>();
        payload.put("phone", "+1111111111");
        payload.put("to", "+1111111112");
        System.out.println("Call Response:"+ phlo);
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using System;
using Plivo;

namespace test_PHLO_dotnet
{
    class Program
    {
        public static void Main(string[] args)
        {
            var phloClient = new PhloApi("auth_id", "auth_token");
            var phloID = "phlo_id";
            var phlo = phloClient.Phlo.Get(phloID);   
            Console.WriteLine(phlo());
        }
    }
}
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
  https://phlorunner.plivo.com/v1/phlo/{phlo_id}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package main

import (
	"fmt"
	"plivo-go"
)

// Initialize the following params with corresponding values to trigger resources

const authId  = "auth_id"
const authToken = "auth_token"
const phloId = "phlo_id"


func main() {
	testPhloGet()
}

func testPhloGet() {
	phloClient,err := plivo.NewPhloClient(authId, authToken, &plivo.ClientOptions{})
	if err != nil {
		panic(err)
	}
	response, err := phloClient.Phlos.Get(phloId)
	if err != nil {
		panic(err)
	}
	fmt.Printf("Response: %#v\n", response)

}