Skip to content

Cannot use RestClient and PhloRestClient Together #314

@vikram-saini

Description

@vikram-saini

We have an issue where we sending calls to the BrowserSDK. To do this successfully, we need to first check the status of the agent using the RestClient Endpoint method and then run our PHLO app.

For some reason we are unable to do this as the PhloRestClient refuses to work after using the RestClient. Things we have tried:

`require $code_path.'/plivo/vendor/autoload.php';
use Plivo\XML\Response;
use Plivo\RestClient;
$response = new Response();
$auth_id = '';
$auth_token = '';
$api = new RestClient($auth_id, $auth_token);
use Plivo\Resources\PHLO\PhloRestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new PhloRestClient($auth_id, $auth_token);

$getEndPointDetails = $api->endpoints->get( '<endpoint>' );
//print_r($getEndPointDetails->); echo '<hr />';


$client = new PhloRestClient($auth_id, $auth_token);

try {
    $response = $client->phlo->getPhlo("359193c3-ce97-4a81-8d67-64a2bcf99507");
    print_r($response);
} catch (PlivoRestException $ex) {
    print_r($ex);
}`

Any help will be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions