Reputation: 43
All of a sudden started getting error.
Bad Request. User message: "You cannot share this item because it has been flagged as inappropriate."] Location[ - ] Reason[abusiveContentRestriction] Domain[global]
Uploading a file and then sharing the file permission through Service Account, the following Google Drive Permission API for sharing the file access to the email id.
https://developers.google.com/drive/api/v3/reference/permissions/create
role: writer
type: user
emailAddress: [email protected]
This is happening for all the files, irrespective of the file content, so nothing wrong with the content. And same content works well with different service account which is in used for pre-production setup.
We've checked the available online resources, but that was not helping us.
Update: In our recent communication with the Google Team, they suggested impersonating the service account with actual user-account to avoid such kind of error which might be related to the service account limit hit.
Upvotes: 0
Views: 229
Reputation: 43
Update: In our recent communication with the Google Team, they suggested impersonating the service account with actual user-account to avoid such kind of error which might be related to the service account limit hit. By impersonating it with domain wide authority, it worked.
Upvotes: 0
Reputation: 116868
This is an issue with the file itself and not related to the api
if your file was flagged you can go to the drive web application and request that the file be reviewed again review
if the file is uploaded to the server account drive account I don't think you can request a review.
It appears that the user may be a workspace domain user. If the file was uploaded to the shard domain was domain wide delegation properly configured on the service account? I also wonder what type of file this is.
Upvotes: 2