pulkitjalan / google-apiclient

Google api php client wrapper with Cloud Platform and Laravel support
MIT License
249 stars 75 forks source link

Path to .json file #16

Closed ghost closed 7 years ago

ghost commented 7 years ago

I'm struggling to understand the correct way to write the path to the service account .json file.

Help would be appreciated.

iggori commented 7 years ago

'file' => env('GOOGLE_SERVICE_ACCOUNT_JSON_LOCATION', base_path('some_folder/some_name.json'))

pulkitjalan commented 7 years ago

Thanks @iggori.

@KriiV it needs to be the full path to the file. If you are using the environment variable in you .env then you can simply set it like so:

GOOGLE_SERVICE_ACCOUNT_JSON_LOCATION=/full/path/to/json/file

As an alternative you can modify the config file as show by @iggori above.