If one user is making a lot of requests on behalf of many users of a
G Suite domain, consider a
Service Account with authority
delegation to impersonate the owner of each document to share (setting the
quotaUser parameter).

403: The user has not granted the app {appId} {verb} access to the file {fileId}

The requesting app is not on the ACL for the file. The user never explicitly opened the file with this Drive app.

Suggested action: Report to the user that there is a need to ask for those permissions in order to update the file. You may also want to check user access levels in the metadata retrieved by files.get and use that to change your UI to a read only UI.

403: App with id {appId} cannot be used within the authenticated user's domain

The policy for the user's domain does not allow access to Google Drive by your app.

Suggested action: Use exponential backoff, include a
check before retrying non-idempotent requests.

Implementing exponential backoff

Exponential backoff is a standard error handling strategy for network
applications in which the client periodically retries a failed request over an
increasing amount of time. If a high volume of requests or heavy network
traffic causes the server to return errors, exponential backoff may be a good
strategy for handling those errors. Conversely, it is not a relevant
strategy for dealing with errors unrelated to rate-limiting, network volume or
response times, such as invalid authorization credentials or file not found
errors.

Used properly, exponential backoff increases the efficiency of bandwidth usage,
reduces the number of requests required to get a successful response, and
maximizes the throughput of requests in concurrent environments.

Create requests are not idempotent. A simple retry is insufficient and may
result in duplicate entities. Check whether the entity exists before retrying.

Important: If your application needs additional quota, it can be requested in
the Google API Console under the
Quotas tab of a project. Only request additional quota if your application
is exceeding the courtesy limit for the Drive API, or if it is exceeding the
per-user limit. If exceeding the per-user limit, it is possible that your
application code should be optimized to make fewer requests.