I would like use Wildix API for see the state of my phone for start but I don’t know to use authentification.
I had an 403 and 401 error when I try login me on subdomain.wildixin.com
Thanks
I tried to put my token in setting of my script but I have an 401 error
`<?php
require_once 'vendor/autoload.php';
use WildixIntegrationsClient;
$config = [
'host' => 'https://subdomain.wildixin.com/',
'app_id' => 'xxx',
'secret_key' => 'xxx',
'app_name' => 'xxx',
];
$client = new Client($config, []);
$options = [
'params' => [],
'body' => [],
'headers' => [
'Authorization' => 'Bearer ' . base64_encode($config['app_id'] . ':' . $config['secret_key']),
],
];
$response = $client->get('api/v1/PBX/settings/CallQueues/', $options);
header('Content-Type: application/json'); //I
echo json_encode([
'status_code' => $response->getStatusCode(),
'headers' => $response->getHeaders(),
'body' => json_decode($response->getBody()->getContents())
]);
?>
<html>
<head>
<title>Untitled</title>
</head>
<body>
</body>
</html>
`
New contributor
Philippe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.