Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use RestClient and PhloRestClient Together #314

Open
vikram-saini opened this issue Apr 13, 2023 · 0 comments
Open

Cannot use RestClient and PhloRestClient Together #314

vikram-saini opened this issue Apr 13, 2023 · 0 comments

Comments

@vikram-saini
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant