Skip to content

Category: PHP Code Snippets

Devicecloud digi – API Authentication Example using PHP

$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);…

Leave a Comment