Example of Registering the Google Cloud Print service.
The G4GREGSVC command allows you to register a service with your Google ID. Registering a service allows G4G to access the functionality of this service for the ID specified using OAuth v2.0 security.
When this command is run you'll be presented with a URL to go to in your browser after first signing into your Google account.
Next you'll be given a code to enter when asked. You will then be asked in the browser if you wish to grant access to G4G to the specific service. Once complete, G4G will have access to the particular service for your Google ID.
See the example below for the flow you should expect.
First the following command is entered:
G4GREGSVC ID(firstname.lastname@example.org) SERVICE(*CLOUDPRINT)
You will then be presented with a screen similar to the following:
You will then sign into your Google Account and copy and paste the URL shown above. You will be presented with a web page similar to the following:
You will then copy and paste the code from the G4G screen into the space provided on the web page (making sure there there are no trailing blanks, etc).
You will then be presented with a page that will ask if you want to allow GreenTools for Google Apps (G4G) access to the particular application. In this example we were setting up Google Cloud Print, so we are presented with the following web page:
Now, we simply click the "Allow access" button and we will be presented with the following screen:
Now, return to the G4G display that we copied the code from and press the F6 key to continue. At this point G4G will connect to Google and retrieve the required authorization codes so that it can work with the service requested. It will also perform any other work (such as requesting a list of Google Cloud Printers that are available using the G4GLSTPRT command).
When this is complete and no errors occur, your G4G display should look similar to the following:
At this point you're ready to use commands associated with that service!