Skip to content

Devicecloud digi – API Authentication Example using PHP

Last updated on December 24, 2015

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://devicecloud.digi.com/ws/v1/devices/inventory');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FLASE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FLASE);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, 'username:password');
$data = curl_exec($ch);
curl_close($ch);
$data = json_decode($data);
print_r($data);
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments