title: I have this error with Google Cloud Natural Language API: The AnnotateTextRequest.features is empty in PHP
body: <p>I do not found solution, I do my code in base to other code that I found in the web <a href="http://zakilive.com/tag/google-cloud-messaging-php-tutorial/" rel="nofollow">http://zakilive.com/tag/google-cloud-messaging-php-tutorial/</a> , because in Google not exist sample for php, I have the next Code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  
  
  define( "API_ACCESS_KEY", "my api key" );
  
  $msg = array
  (
   'document'  =&gt; array(
   
    'type'=&gt;'PLAIN_TEXT',
    'content'=&gt;"Michelangelo Caravaggio, Italian painter, is known for
                'The Calling of Saint Matthew'."
   
   ),
   'encodingType'=&gt;'UTF8',
  );
  
  
  $headers = array
  (
   'Authorization: Bearer ' . API_ACCESS_KEY,
   'Content-Type: application/json'
  );
   
  $ch = curl_init();
  curl_setopt( $ch,CURLOPT_URL, 'https://language.googleapis.com/v1beta1/documents:annotateText' );
  
  curl_setopt( $ch,CURLOPT_POST, true );
  curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );
  curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
  curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, false );
  curl_setopt( $ch,CURLOPT_POSTFIELDS, json_encode( $msg ) );
  $result = curl_exec($ch );
  curl_close( $ch );
  echo $result;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The complete response is:
  { "error": { "code": 400, "message": "The AnnotateTextRequest.features is empty.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [ { "field": "AnnotateTextRequest.features", "description": "No features specified." } ] } ] } }</p>
  
  <p>I could not do the code in other language still.</p>
  
  <p>Help me please</p>
  
  <p>The API is: <a href="https://cloud.google.com/natural-language/docs/" rel="nofollow">https://cloud.google.com/natural-language/docs/</a></p>