Google Cloud API - Application Default Credentials

前端 未结 5 1329
借酒劲吻你
借酒劲吻你 2021-02-04 07:04

I have the following code, modified from Google\'s documentation:

        $GOOGLE_APPLICATION_CREDENTIALS = \"./[path].json\";
        $_ENV[\"GOOGLE_APPLICATION         


        
5条回答
  •  逝去的感伤
    2021-02-04 07:18

    Alternatively you can define a path to your json file like this

    $client = new Google_Client();
    $client->setAuthConfig('/path/to/credentials.json');
    

提交回复
热议问题