I'm having trouble with the Google Calendar Access Token. The problem is this. I have to synchronize the calendar of my application with Google Calendar, being that users will provide their emails for google authentication, which will provide the token so that third parties can include events in the account of the user who authorized the service. When I already have access to a user's token and I use it to do this whole 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 a reset of the touch, I consume it again?
PS: When I'm going to do includi
of an event, I'm using Ajax with the dynamic access token and calendar id too.
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'
});