title: invalidargumentexception credentials.json" does not exist
body: <p>I am trying to use Google APIs with craft cms. To pull data from my calendar from Google. I modify the quickstsrt.php that Google had on Github. That works but when I went to add the code to my Craft plugin it's not able to find the JSON file anymore</p>
  <p>I have the same code working outside of craft. I have gone through the google results and was not able to find any solution that would work. it may be the why I authorized my google account but like I said the PHP works outside of craft</p>
  <pre><code>public function getClient()
  {
      $client = new Google_Client();
      $client-&gt;setApplicationName('Google Calendar API PHP Quickstart');
      $client-&gt;setScopes(Google_Service_Calendar::CALENDAR_READONLY);
      $client-&gt;setAuthConfig(credentials.json);
      $client-&gt;setAccessType('offline');
      $client-&gt;setPrompt('select_account consent');
  
  // Load previously authorized token from a file, if it exists.
  // The file token.json stores the user's access and refresh tokens, and is
  // created automatically when the authorization flow completes for the first
  // time.
  $tokenPath = 'token.json';
  if (file_exists($tokenPath)) {
      $accessToken = json_decode(file_get_contents($tokenPath), true);
      $client-&gt;setAccessToken($accessToken);
  }
  
  // If there is no previous token or it's expired.
  if ($client-&gt;isAccessTokenExpired()) {
      // Refresh the token if possible, else fetch a new one.
      if ($client-&gt;getRefreshToken()) {
          $client-&gt;fetchAccessTokenWithRefreshToken($client-&gt;getRefreshToken());
      } else {
          // Request authorization from the user.
          $authUrl = $client-&gt;createAuthUrl();
          printf(&quot;Open the following link in your browser:\n%s\n&quot;, $authUrl);
          print 'Enter verification code: ';
          $authCode = trim(fgets(STDIN));
  
          // Exchange authorization code for an access token.
          $accessToken = $client-&gt;fetchAccessTokenWithAuthCode($authCode);
          $client-&gt;setAccessToken($accessToken);
  
          // Check to see if there was an error.
          if (array_key_exists('error', $accessToken)) {
              throw new Exception(join(', ', $accessToken));
          }
      }
      // Save the token to a file.
      if (!file_exists(dirname($tokenPath))) {
          mkdir(dirname($tokenPath), 0700, true);
      }
      file_put_contents($tokenPath, json_encode($client-&gt;getAccessToken()));
  }
  return $client;
  
  InvalidArgumentException: file &quot;/home/mesicdev/www/craft/plugins/credentials.json&quot; does not exist in /home/mesicdev/public_html/craft/plugins/calendarpuller/src/services/vendor/google/apiclient/src/Google/Client.php:870
  </code></pre>
  <p>Stack trace:</p>
  <h1>0 /home/mesicdev/public_html/craft/plugins/calendarpuller/src/services/CalendarService.php(87): Google_Client-&gt;setAuthConfig('/home/mesicdev/...')</h1>
  <h1>1 /home/mesicdev/public_html/craft/plugins/calendarpuller/src/services/CalendarService.php(60): campnonet\calendarpuller\services\CalendarService-&gt;getClient()</h1>
  <h1>2 /home/mesicdev/public_html/craft/plugins/calendarpuller/src/controllers/CalendarController.php(63): campnonet\calendarpuller\services\CalendarService-&gt;getCalendarInfo()</h1>
  <h1>3 [internal function]: campnonet\calendarpuller\controllers\CalendarController-&gt;actionDefault(true)</h1>
  <h1>4 /home/mesicdev/public_html/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)</h1>
  <h1>5 /home/mesicdev/public_html/craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction-&gt;runWithParams(Array)</h1>
  <h1>6 /home/mesicdev/public_html/craft/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller-&gt;runAction('default', Array)</h1>
  <h1>7 /home/mesicdev/public_html/craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller-&gt;runAction('default', Array)</h1>
  <h1>8 /home/mesicdev/public_html/craft/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module-&gt;runAction('calendar-puller...', Array)</h1>
  <h1>9 /home/mesicdev/public_html/craft/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application-&gt;runAction('calendar-puller...', Array)</h1>
  <h1>10 /home/mesicdev/public_html/craft/vendor/craftcms/cms/src/web/Application.php(286): yii\web\Application-&gt;handleRequest(Object(craft\web\Request))</h1>
  <h1>11 /home/mesicdev/public_html/craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application-&gt;handleRequest(Object(craft\web\Request))</h1>
  <h1>12 /home/mesicdev/public_html/craft/web/index.php(21): yii\base\Application-&gt;run()</h1>
  <h1>13 {main}</h1>