Google Calendar v3 Error “The requested minimum modification time lies too far in the past. [410]”

时光总嘲笑我的痴心妄想 提交于 2019-12-24 14:27:29

问题


We are using the Google Calendar v3 API to return a list of events for a user that have been updated since a point in time.

In the v2 API there was no limitation on setting this date in the past.

If we set the UpdatedMin to a date too far back (like 2 months) then the error is thrown

"The requested minimum modification time lies too far in the past. [410]"

If we set ShowDeleted to false then we do not get the error.

I cannot find any reference to a limitation here. Does anybody know the details of this limit. Unfortunately when synchronising calendars this is a show stopper when synchronisation has not run for a period of time for a calendar (other than running a full list which we would prefer to avoid)

EventsResource.ListRequest lr = new EventsResource.ListRequest(service, c.uc.calendar); 

lr.UpdatedMin = c.primaryModTime.ToLocalTime();
lr.ShowDeleted = true;
Events el = lr.Execute();
if (el.Items.Count > 0)
{   

the following also discusses this issue but without any resoluton.

https://groups.google.com/forum/#!msg/google-calendar-api/_rk9o45sXT0/3APXqxi8jvkJ


回答1:


There is some explanation at:

https://developers.google.com/google-apps/calendar/v3/sync

It says that on 410 you should wipe your storage and perform a full sync instead.

Also consider switching to sync tokens as recommended in the last paragraph.



来源:https://stackoverflow.com/questions/23750856/google-calendar-v3-error-the-requested-minimum-modification-time-lies-too-far-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!