# build uri $uri = $this->endpoint . $this->hubPath . “/registrations” . NotificationHub::API_NEW_VERSION; $ch = curl_init(); $token = $this->generateSasToken($uri); $headers = [ ‘Authorization: ‘. $token, ‘Content-Type: application/xml’, ‘x-ms-version: 2015-01’ ]; $request_body = self::requestBodyRegistration($device_type, $tagsOrTagExpression, $device_code ); if( is_null( $request_body ) ) { return null; } curl_setopt_array($ch, array( CURLOPT_URL => $uri, CURLOPT_POST => TRUE, CURLOPT_RETURNTRANSFER => TRUE, … Read more