I'm trying to setup Google Bigquery with Firebase and am having some issues. I have gcloud installed on my machine (MacOS Sierra) and have google cloud installed via composer on my project.

The following code on my project:

# Includes the autoloader for libraries installed with composer require __DIR__ . '/vendor/autoload.php'; # Imports the Google Cloud client library use Google\Cloud\BigQuery\BigQueryClient; # Your Google Cloud Platform project ID $projectId = 'hidden here only'; # Instantiates a client $bigquery = new BigQueryClient([ 'projectId' => $projectId ]); # The name for the new dataset $datasetName = 'test_dataset'; # Creates the new dataset $dataset = $bigquery->createDataset($datasetName); echo 'Dataset ' . $dataset->id() . ' created.';

All I'm trying to do is just create a dataset within bigquery via the library but I'm not able to due to the following error:

Fatal error: Uncaught Google\Cloud\Exception\ServiceException: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information in /Applications/MAMP/htdocs/projects/work/bigquery-tests/vendor/google/cloud/src/RequestWrapper.php on line 219