I am using the following code:
require 'vendor/autoload.php';
use Google\Cloud\Translate\V2\TranslateClient;
$API_KEY='my-key';
$translate = new TranslateClient([
'key' => $API_KEY
]);
// Translate text from english to french.
$result = $translate->translate('Hello world!', [
'target' => 'fr',
'restOptions' => [
'headers' => [
'referer' => 'http://localhost:4001'
]
]
]);
This would basically result in the following error:
Quoting the documentation, it says: "The error message states Daily Limit Exceeded if you exceeded a daily quota or User Rate Limit Exceeded if you exceeded a per minute quota.". I have waited more than one minute and still the same problem. Does anyone has an idea?
NOTE: I am using laravel artisan tinker
to perform the code above as a script