title: UIDAI Adhaar API in PHP
body: <pre><code>$curl = curl_init();
  $xml_data = '&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
    &lt;Auth uid=”999999990019” tid=”public” ac=”public” sa=”public” ver=”1.6”txn=”AuthDemoClient:public:20160616070338756” lk=”MBFWjkJHNFfLidl8oOHtUwgL5p1ZjDbWrqsMEVEJLVEDpnlNj_CZTg”&gt;
      &lt;Uses pi=”y” pa=”n” pfa=”n” bio=”n” bt=”n” pin=”” otp=”n”/&gt;
      &lt;Tkn type=”” value=””/&gt;
      &lt;Meta udc=”” fdc=”” idc=”” pip=”” lot=”G|P” lov=””/&gt;
      &lt;Skey ci=”” ki=””&gt;&lt;/Skey&gt;
      &lt;Data type=”X|P”&gt;encrypted PID block&lt;/Data&gt;
      &lt;Hmac&gt;SHA-256 Hash of Pid block, encrypted and then encoded&lt;/Hmac
      &lt;Signature&gt;Digital signature of AUA&lt;/Signature&gt;
    &lt;/Auth&gt;
  &lt;/xml&gt;'; 
  curl_setopt($curl, CURLOPT_URL,"http://auth.uidai.gov.in/1.6/public/9/9/MH4hSkrev2h_Feu0lBRC8NI-iqzT299_qPSSstOFbNFTwWrie29ThDo");
  curl_setopt($curl, CURLOPT_POST, true);
  curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: text/xml','Content-Length:length'));
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($curl, CURLOPT_POSTFIELDS, $xml_data);
  $result = curl_exec($curl);
  curl_close($curl);
  print_r($result);
  </code></pre>
  
  <p>This is the sample code which I wrote.Needs test data for some of the left out attributes like <strong>udc,fdc,idc</strong> etc. When I try to fire this API gets <strong>400-Bad Request</strong>.Help would be appriciated.</p>