问题
I am creating a booking system with server to server auth with google calendar API. Sometimes when I create events with the API I get this :
{
error: {
errors: [
{
domain: "usageLimits",
reason: "dailyLimitExceededUnreg",
message: "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
extendedHelp: "https://code.google.com/apis/console"
}
],
code: 403,
message: "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
}
}
But otherwise the API says the event has been created, but there is no event created in the calendar... In all other cases event is created successfully, but this leads to missing events sometimes. Where I can remove this limit, so all events that i create with the Api to be saved to google calendar?
回答1:
It looks like there is an issue with Service Accounts inviting people to Calendar Events.
In case you own a GSuite domain, a current workaround would be performing Domain-Wide delegation. According to the documentation:
- Go to your G Suite domain’s Admin console.
- Select Security from the list of controls. If you don't see Security listed, select More controls from the gray bar at the bottom of the page, then select Security from the list of controls. If you can't see the controls, make sure you're signed in as an administrator for the domain.
- Select Show more and then Advanced settings from the list of options.
- Select Manage API client access in the Authentication section.
- In the Client Name field enter the service account's Client ID. You can find your service account's client ID in the Service accounts page.
- In the One or More API Scopes field enter the list of scopes that your application should be granted access to. For example, if your application needs domain-wide access to the Google Drive API and the Google Calendar API, enter: https://www.googleapis.com/auth/drive, https://www.googleapis.com/auth/calendar.
- Click Authorize
Regarding the existing issue, you can click on the star next to the issue number to give more priority to the bug and to receive email updates.
来源:https://stackoverflow.com/questions/58860627/google-calendar-api-daily-limit-for-unauthenticated-use-exceeded-continued-use