我想限制个人Google云端硬盘中文件的功能。当我将API资源管理器Google Drive v3 API用于以下请求时:
POST https://www.googleapis.com/drive/v3/files?key={YOUR_API_KEY}
{
"capabilities": {
"canCopy": false
},
"name": "testfile"
}
我收到以下答复:
403
- Show headers -
{
"error": {
"errors": [
{
"domain": "global",
"reason": "fieldNotWritable",
"message": "The resource body includes fields which are not directly writable."
}
],
"code": 403,
"message": "The resource body includes fields which are not directly writable."
}
}
与尝试更新文件时得到的响应相同:
PATCH https://www.googleapis.com/drive/v3/files/FileIdHere?key={YOUR_API_KEY}
{
"capabilities": {
"canCopy": false
}
}
似乎没有方法可以做到这一点,或者有人可以解决吗?