Giter VIP home page Giter VIP logo

minimalgooglecalendarwebaccess's Introduction

MinimalGoogleCalendarWebAccess

This is a minimal maven project which connects to Google Calendar version 1.15.0-rc using OAuth 2.0.

The first time you run this program, you will be prompted for your own application's Google authentication credentials. You can create a new application and get credentials here: https://code.google.com/apis/console This will create a private "config.xml" file that you can edit later at any time if your credentials change. This project is for a Web Server application, choose your client id and secret accordingly. You may choose a redirect URI such as "http://localhost:8080/callback/" for testing purposes.

To build the project requires Maven and Java 1.6 or later:

mvn clean install

To run the example, you can then use:

mvn exec:java -Dexec.mainClass="glank.app.examples.google.calendar.SimpleCalendarTest"

The project comes with an Eclipse build configuration that will perform both of these commands for you if you are using eclipse.

You will be given a URL to go to in a browser. Once there, you will be prompted to allow access to your calendar data. If you click yes, you will be redirected to the URI you specified in GCGlobals. In the address bar, after the "?" in the URL, should be a parameter like this "code=vs834jn8us.l29jr/2l3kj5j2" Copy that value, "vs834jn8us.l29jr/2l3kj5j2", and paste it when the program asks for the code. If all your credential's check out, you should be provided with a list of all your Google Calendars.

That is the OAuth 2.0 authentication process in the simplest example I could muster. See the source code for further explanation, it is thoroughly commented.

minimalgooglecalendarwebaccess's People

Contributors

glank avatar

Stargazers

Jan Tomsa avatar

Watchers

James Cloos avatar  avatar

minimalgooglecalendarwebaccess's Issues

Urgent

Exception in thread "main" java.lang.NoSuchMethodError: com.google.api.client.auth.oauth2.AuthorizationCodeFlow$Builder.setScopes(Ljava/lang/Iterable;)Lcom/google/api/client/auth/oauth2/AuthorizationCodeFlow$Builder;
at com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow$Builder.setScopes(GoogleAuthorizationCodeFlow.java:244)
at com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow$Builder.(GoogleAuthorizationCodeFlow.java:208)
at SimpleCalendarTest.main(SimpleCalendarTest.java:43)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.