1

I try to call post api from laravel with GuzzleHttp\Client.but we try tp pass api key with different ways but not get output if i append API key in url then i get this result.

//intiate client
$client = new \GuzzleHttp\Client([
                'base_uri' => 'https://language.googleapis.com/',
            ]);

//api call for get data entitiwise

$response = $client->request('POST','/v1/documents:analyzeEntities?key=' . $apiKey, $finalData);
Brendan
  • 1,017
  • 5
  • 7

1 Answers1

0

There is no problem with your api key. You have to set either 'content' or 'gcsContentUri' in your request: https://cloud.google.com/natural-language/docs/reference/rest/v1/documents#Document

Brendan
  • 1,017
  • 5
  • 7