From what I read secid , is the session id derived from browser cookies. While your business uses Java, which implies a server application. If so, you want to abandon the idea of ββfully using secid .
Instead, you want to check out the Google OAuth2 Documentation . If you use Java, you will most likely be interested in the OAuth flow of the web server . Pay particular attention to sequence diagrams.
Key steps are:
1) Get the authorization code from Google OAuth with the consent of the user. To do this, you redirect the user to Google with the appropriate scope. View a list of calendar areas for your case. After the user agrees, Google will redirect the authorization code back to you.
2) Call Google OAuth with the authorization code and your application credentials to exchange the access token.
3) Call the Google Calendar API using an access token.
And if you use the Google Java client, as suggested by @ChaosPredictor, most likely some of the steps are already wrapped in the Java client (and your code will be much simpler).
neurite
source share