Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST
https://oauth2.googleapis.com/token\` resulted in a `400 Bad Request` response: {"error":"invalid_grant","error_description":"Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values in the JWT claim."} in /var/www/html/*****/''''''/google-api-php-client--PHP7.4/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /var/www/html/*****/''''''/google-api-php-client--PHP7.4/vendor/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\Exception\RequestException::create() #1 /var/www/html/*****/''''''/google-api-php-client--PHP7.4/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp{closure}() #2 /var/www/html/*****/''''''/google-api-php-client--PHP7.4/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler() #3 /var/www/html/*****/''''''/google-api-php-client--PHP7.4/vendor/guzzlehttp/pr in /var/www/html/*****/''''''/google-api-php-client--PHP7.4/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113
I am trying to migrate my FCM from the legacy to http v1. I already follow the docs here,
https://firebase.google.com/docs/cloud- ... migrate-v1, downloaded the Firebase admin SDK and installed google API for PHP 7.4 (
https://github.com/googleapis/google-api-php-client). However, its not working as expected and I have been trying days to make it working. Can someone point out what I did wrong here?
As a side note, I need to send notification from the web to the user android device. The device token generated and saved in the database. I am still learning so please bear with me.
Источник:
https://stackoverflow.com/questions/766 ... cm-http-v1