【发布时间】:2021-08-24 02:28:53
【问题描述】:
您好,我正在尝试使用 google drive api 获取资源密钥 我已经更新了你们推荐的安全性
但我仍然无法使用 fileId 从文件的 get api 中获取 resourceKey 所以我想检查像谷歌文档、谷歌表格、谷歌幻灯片、谷歌表单这样的谷歌文档不需要用于共享链接的资源键,比如 exportLinks、webContentLink 和 webViewLink 还有当我使用谷歌驱动文件的get方法时,谷歌文档的文件类型是否有resourceKey?
我附上了我的谷歌电子表格文件元数据的回复 请检查以下内容并教我我错了什么或错过了什么
"kind": "drive#file",
"id": "1X8LSm3IuA90EDGg3DRQ39cs87OoQYDjxrJwoxq0bPx4",
"name": "CSS_v1_lpNnyJfGaiAo_6",
"mimeType": "application/vnd.google-apps.spreadsheet",
"starred": false,
"trashed": false,
"explicitlyTrashed": false,
"spaces": [
"drive"
],
"version": "8",
"webViewLink": "https://docs.google.com/spreadsheets/d/1X8LSm3IuA90EDGg3DRQ39cs87OoQYDjxrJwoxq0bPx4/edit?usp=drivesdk",
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.spreadsheet",
"hasThumbnail": true,
"thumbnailLink": "https://docs.google.com/feeds/vt?gd=true&id=1X8LSm3IuA90EDGg3DRQ39cs87OoQYDjxrJwoxq0bPx4&v=2&s=AMedNnoAAAAAYSRx8dDKAoD1Q16M021MvQjUnGn3rCDS&sz=s220",
"thumbnailVersion": "2",
"viewedByMe": true,
"viewedByMeTime": "2021-04-08T08:51:13.861Z",
"createdTime": "2021-04-08T08:45:54.117Z",
"modifiedTime": "2021-04-08T08:46:04.434Z",
"modifiedByMe": false,
"sharedWithMeTime": "2021-04-08T08:51:13.861Z",
"owners": [
{
"kind": "drive#user",
"displayName": "realsearch@realsearch-1611815321770.iam.gserviceaccount.com",
"me": false,
"permissionId": "08922093982962563488",
"emailAddress": "realsearch@realsearch-1611815321770.iam.gserviceaccount.com"
}
],
"lastModifyingUser": {
"kind": "drive#user",
"displayName": "realsearch@realsearch-1611815321770.iam.gserviceaccount.com",
"me": false,
"permissionId": "08922093982962563488",
"emailAddress": "realsearch@realsearch-1611815321770.iam.gserviceaccount.com"
},
"shared": true,
"ownedByMe": false,
"capabilities": {
"canAddChildren": false,
"canAddMyDriveParent": false,
"canChangeCopyRequiresWriterPermission": false,
"canChangeSecurityUpdateEnabled": false,
"canChangeViewersCanCopyContent": false,
"canComment": true,
"canCopy": true,
"canDelete": false,
"canDownload": true,
"canEdit": true,
"canListChildren": false,
"canModifyContent": true,
"canMoveChildrenWithinDrive": false,
"canMoveItemIntoTeamDrive": false,
"canMoveItemOutOfDrive": false,
"canMoveItemWithinDrive": true,
"canReadRevisions": true,
"canRemoveChildren": false,
"canRemoveMyDriveParent": true,
"canRename": true,
"canShare": true,
"canTrash": false,
"canUntrash": false
},
"viewersCanCopyContent": true,
"copyRequiresWriterPermission": false,
"writersCanShare": true,
"permissions": [
{
"kind": "drive#permission",
"id": "anyoneWithLink",
"type": "anyone",
"role": "writer",
"allowFileDiscovery": false
},
{
"kind": "drive#permission",
"id": "08922093982962563488",
"type": "user",
"emailAddress": "realsearch@realsearch-1611815321770.iam.gserviceaccount.com",
"role": "owner",
"displayName": "realsearch@realsearch-1611815321770.iam.gserviceaccount.com",
"deleted": false
}
],
"permissionIds": [
"anyoneWithLink",
"08922093982962563488"
],
"quotaBytesUsed": "0",
"isAppAuthorized": false,
"exportLinks": {
"application/x-vnd.oasis.opendocument.spreadsheet": "https://docs.google.com/spreadsheets/export?id=1X8LSm3IuA90EDGg3DRQ39cs87OoQYDjxrJwoxq0bPx4&exportFormat=ods",
"text/tab-separated-values": "https://docs.google.com/spreadsheets/export?id=1X8LSm3IuA90EDGg3DRQ39cs87OoQYDjxrJwoxq0bPx4&exportFormat=tsv",
"application/pdf": "https://docs.google.com/spreadsheets/export?id=1X8LSm3IuA90EDGg3DRQ39cs87OoQYDjxrJwoxq0bPx4&exportFormat=pdf",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "https://docs.google.com/spreadsheets/export?id=1X8LSm3IuA90EDGg3DRQ39cs87OoQYDjxrJwoxq0bPx4&exportFormat=xlsx",
"text/csv": "https://docs.google.com/spreadsheets/export?id=1X8LSm3IuA90EDGg3DRQ39cs87OoQYDjxrJwoxq0bPx4&exportFormat=csv",
"application/zip": "https://docs.google.com/spreadsheets/export?id=1X8LSm3IuA90EDGg3DRQ39cs87OoQYDjxrJwoxq0bPx4&exportFormat=zip",
"application/vnd.oasis.opendocument.spreadsheet": "https://docs.google.com/spreadsheets/export?id=1X8LSm3IuA90EDGg3DRQ39cs87OoQYDjxrJwoxq0bPx4&exportFormat=ods"
},
"linkShareMetadata": {
"securityUpdateEligible": false,
"securityUpdateEnabled": true
}
}
【问题讨论】:
-
不,你读过我的问题了吗?我问谷歌文档是否有resourceKey
标签: google-drive-api