我想以编程方式为我的google驱动器文件设置权限,就像有人拥有google驱动器可共享链接,以便他可以阅读一样。将role
设置为reader
,将type
设置为anyone
之后,尝试使用api给了我403
。任何帮助,将不胜感激。请参考上面的图片。
这是我的HTTP GET响应的一部分
"userPermission":{
"kind":"drive#permission",
"etag":"\"v8V6DvTBE_bfiGlEO9jLLdDEcEE/vrb4MS7MSuazJcKlWO78yMuKxF0\"",
"id":"me",
"selfLink":"https://www.googleapis.com/drive/v2/files/1Vnp6v2VSE3sHKb9H9ChJPc8VPozuVtyd/permissions/me",
"role":"owner",
"type":"user"
},
"originalFilename":"1200px-Arriva_T6_nearside.JPG",
"fileExtension":"JPG",
"md5Checksum":"52f04535ea275c8be7ad87853a49fb87",
"fileSize":"343589",
"quotaBytesUsed":"343589",
"ownerNames":[
"Dev Drive"
],
"owners":[
{
"kind":"drive#user",
"displayName":"Dev Drive",
"isAuthenticatedUser":true,
"permissionId":"00918695921514386946",
"emailAddress":"devdrive@finetechlk.net"
}
],