Google Calendar Api

Asked

Viewed 935 times

1

I’m having problems with Google Calendar Access Token. Okay, here’s the problem. I have to synchronize the calendar of my application with Google Calendar, and users will provide their emails for google authentication, which will provide the token so that third parties can include events in the schedule of the user who authorized the service. When I already have access to some user’s token and use to do all this process, the token works for a certain period, because it resets.

The problem is, how can I use this access token without this problem, since resetting this token every time there is an event inclusion will exceed the number of times the token can be reset?

Is there any way to make this token static, or whenever there is the reset of touch, I consume it again?

PS: When will I do the includi of an event, I’m using Ajax with dynamic access token and agenda id as well.

Ex.:

var url = 'https://www.googleapis.com/calendar/v3/calendars/'+ [email protected] +'/events?sendNotifications=false&access_token=' + access_token;

$.ajax({
    url: url,
    contentType: "application/json",
    data: JSON.stringify(resource),
    method : 'POST'
});
  • 1

    See the expiration rules for the google token, it might help. https://developers.google.com/identity/protocols/OAuth2#expiration

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.