There are three levels of registration:
- Unregistered: Application is not recognized by Google. The Access Request page, which prompts your users to either grant or deny access for your application, displays this caution highlighted in yellow: "Non-registered, not secure. This website has not registered with Google. We recommend that you continue the process only if you trust this destination."
- Registered: Application is recognized by Google. The Access Request page displays this caution: "Registered, not secure. This website is registered with Google to make authorization requests, but has not been configured to send requests securely. We recommend you continue if you trust this destination."
- Registered with enhanced security: Registered applications with a security certificate on file can use secure tokens. The Access Request page displays this message: "Registered, secure. This website is registered with Google to make authorization requests."
As we are going to be using the first method of Unregistered the user will getting some simple/basic prompts:
- The first will be asking them to log in and letting them know that "A third party service is requesting permission to access your Google Account"
- Second an Access Request page which lets the user know WHAT we are doing
Once they have logged in and agreed Google will take you back to your site. The
I've put the index.cfm in a folder on the root called contacts. Below is the content for index.cfm read the comments for what each variable is doing. This is all taken from Googles API docs on AuthSub proxy authentication.
Our second page is getAddresses.cfm In the contacts folder
In my example I am only returning 25 records (for speed mainly) but if you want to know more about returning records check out Google API docs on query params. Also in my example I just dump the records. If you want to get out the email addresses you can use the following snippet.
There is still some work to do here but this is the bare bones and a starting point for anyone interested.