Insertion in Calendar by Calendar ID

71 views
Skip to first unread message

kashif zafar

unread,
Sep 10, 2014, 10:01:38 AM9/10/14
to google-ca...@googlegroups.com
I am getting this error during the insertion agaisnt a specific Calendar ID. Can enyone help me on this issue?



Google.Apis.Requests.RequestError

Forbidden [403]

Errors [

Message[Forbidden] Location[ - ] Reason[forbidden] Domain[global]

]

Thanks 
Kashif

Lucia Fedorova

unread,
Sep 11, 2014, 6:44:08 AM9/11/14
to google-ca...@googlegroups.com
Hi Kashif,
my guess would be that you are not correctly authenticated for the calendar into which you are trying to insert the event.

NOOR GANI

unread,
Sep 25, 2023, 4:52:33 AM9/25/23
to Google Calendar API
Hi, 

I am a java developer and integrating goole calendar api, i am able to get the events from the google but i want to  simplify this process so that the user won't have to do  copy-and-paste stuff for the authorization code to be received to get the access token? Currently all I know is that I will need to provide a callback url, but every time when the token expire's we have to open the browser for that.

My Question is can avoid this opening the bwoser or simplify this.

My code is : 

GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));
GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)
.setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))
.setAccessType("offline").build();
LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();
Credential credential = new AuthorizationCodeInstalledApp(flow, receiver).authorize("user");

Best Regards,
Noor.
Reply all
Reply to author
Forward
0 new messages