Owen
Owen

Reputation: 33

Sharing a calendar, acl.insert() now requires the user manual add it via the email notification

to enable our users to view our calendars in Google Calendar, we currently create a calendar on our own service account, then share this calendar with the user using ACL.

In the past, the new calendar would automatically appear on the user's account under "OTHER CALENDARS". They would receive an email notification from Google which would contain "We have automatically added this calendar to your Google Calendar account. You can hide or completely remove this calendar at any time."

However, suddenly calendars were not showing up on their accounts. Eventually I noticed that the notification email now says this: "After adding this calendar to your other calendars, you can hide or completely remove it whenever you want." with a link "Add this calendar."

Only after clicking this link will the calendar appear on their account.

Was this a sudden policy change from Google? Is there a way to avoid this second step?

Here is some example code. The scopes we have enabled and verified are ".../auth/calendar", "email", "profile", "openid".

calendar = service.calendars().insert(body={
                'description':      description,
                'summary':          summary,
                'timeZone':         timezone,
            }).execute()

service.acl().insert(
    calendarId = calendar['id'],
    body={
        'role':     'reader',
        'scope':    {
            'type':     'user',
            'value':    user_email,
        }
    }).execute()

Upvotes: 0

Views: 394

Answers (1)

ale13
ale13

Reputation: 6072

Unfortunately, there is not much that can be done regarding your question about avoiding the second step. Even if there were a policy change on the Google's side, you wouldn't be able to change anything since all the Calendar APIs are hosted on their servers.

A suggestion would be to implement an application that simulates the clicks for Add this calendar which would make things a slightly bit easier for your issue.

Upvotes: 0

Related Questions