Closed simonw closed 2 years ago
% google-drive-to-sqlite get https://www.googleapis.com/drive/v3/files
Error: {
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Drive API has not been used in project 148933860554 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=148933860554 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"extendedHelp": "https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=148933860554"
}
],
"code": 403,
"message": "Access Not Configured. Drive API has not been used in project 148933860554 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=148933860554 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
}
}
This showed me that I need to enable the Drive API: https://console.developers.google.com/apis/library/drive.googleapis.com?project=148933860554
I clicked the button.
OK, the prototype of this works really well:
google-drive-to-sqlite get https://www.googleapis.com/drive/v3/files --paginate files --nl --stop-after 100 \
| sqlite-utils insert /tmp/f.db files - --nl --batch-size 5
As seen in https://github.com/dogsheep/github-to-sqlite#making-authenticated-api-calls