Fatal error: Uncaught Google\Service\Exception: {
"error": {
"code": 401,
"message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"errors": [
{
"message": "Login Required.",
"domain": "global",
"reason": "required",
"location": "Authorization",
"locationType": "header"
}
],
"status": "UNAUTHENTICATED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "CREDENTIALS_MISSING",
"domain": "googleapis.com",
"metadata": {
"method": "google.apps.drive.v3.DriveFiles.Create",
"service": "drive.googleapis.com"
}
}
]
}
}
in /home/humansma/hdd/data/api_google_drive/vendor/google/apiclient/src/Http/REST.php:134
Stack trace:
#0 /home/humansma/hdd/data/api_google_drive/vendor/google/apiclient/src/Http/REST.php(107): Google\Http\REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), 'Google\\Service\\...')
#1 [internal function]: Google\Http\REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google\\Service\\...')
#2 /home/humansma/hdd/data/api_google_drive/vendor/google/apiclient/src/Task/Runner.php(187): call_user_func_array(Array, Array)
#3 /home/humansma/hdd/data/api_google_drive/vendor/google/apiclient/src/Http/REST.php(66): Google\Task\Runner->run()
#4 /home/humansma/hdd/data/api_google_drive/vendor/google/apiclient/src/Client.php(926): Google\Http\REST::execute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google\\Service\\...', Array, NULL)
#5 /home/humansma/hdd/data/api_google_drive/vendor/google/apiclient/src/Service/Resource.php(238): Google\Client->execute(Object(GuzzleHttp\Psr7\Request), 'Google\\Service\\...')
#6 /home/humansma/hdd/data/api_google_drive/vendor/google/apiclient-services/src/Drive/Resource/Files.php(128): Google\Service\Resource->call('create', Array, 'Google\\Service\\...')
#7 /home/humansma/hdd/data/backup_files.php(62): Google\Service\Drive\Resource\Files->create(Object(Google\Service\Drive\DriveFile), Array)
#8 /home/humansma/hdd/data/backup_files.php(85): createGoogleDriveFolder(Object(Google\Service\Drive), 'backup_db', NULL)
#9 /home/humansma/hdd/data/backup_files.php(117): uploadFolderToGoogleDrive(Object(Google\Service\Drive), 'backup_db/')
#10 {main}
thrown in /home/humansma/hdd/data/api_google_drive/vendor/google/apiclient/src/Http/REST.php on line 134