You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to access datastore in another project. I have downloaded credentials JSON file and put it into credentials folder.
Here is my code:
putenv('GOOGLE_APPLICATION_CREDENTIALS=credentials/my-another-project.json');
require_once('php-gds-master/vendor/autoload.php');
$obj_gateway_remote = new \GDS\Gateway\RESTv1('my-another-project');
$obj_store = new GDS\Store('device', $obj_gateway_remote);
$deviceEntities = $obj_store->fetchPage(20);
print_r($deviceEntities);
And I got the error:
PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'json key is missing the type field' in /base/data/home/apps/s~ht-courses/1.396256133006308724/php-gds-master/vendor/google/auth/src/CredentialsLoader.php:118
Please tell me any steps I missed. Thank you.
The text was updated successfully, but these errors were encountered:
I found that I downloaded wrong JSON file.
The correct JSON file should be downloaded from "IAM & Admin -> Server Accounts -> App Engine default service account -> Create Key
Furthermore, "php_sapi_name" function should be enabled in php.ini
However, the program always gets no errors but "exceeded the maximum execution time".
Generally, running on AppEngine, you would be expected to use the Protocol Buffer API & Gateway.
And also, access the "current" project - although I have not tried to access a different project with the Protocol Buffer API, it may well be possible.
I tried to access datastore in another project. I have downloaded credentials JSON file and put it into credentials folder.
Here is my code:
And I got the error:
Please tell me any steps I missed. Thank you.
The text was updated successfully, but these errors were encountered: