Register Your Application
Register Your Application
visit the Google apis console,click "Create project"
Activate the Drive API and Drive SDK
Create an OAuth 2.0 Client ID
Input product name
Select application type
Download JSON
Checkout Instructions
Clone the project from remote
$ cd [someDirectory] $ hg clone https://code.google.com/p/google-api-java-client.samples/ google-api-java-client-samples $ cd google-api-java-client-samples/drive-cmdline-sample $ cp ~/Downloads/client_secrets.json src/main/resources/client_secrets.json
Init variables in DriveSample.java
Compile and Run
$ mvn compile $ mvn -q exec:java
Input Usrname and Passwd
Apply the request