Gmail Context Gadget (Gmail Plugin / Extension): Deprecated? Impossible? How? (Unable to run OAuth 2.0)

We need to develop an internal gmail extension to handle incoming emails so that recipients can interact with our internal software. I tried to figure out how to use OAuth 2.0 in the Gmail Contextual Gadget, but I can not find any specific documentation for this. I could not find anything useful when I was looking for stack overflow using contextual + google-oauth (a keyword recommended by Google).

Before you give me the standard pages, make sure this one has:

  • In a minimal Gmail example, a manifest.xml context gadget that uses OAuth 2.0
  • Ideally, with an explanation of how to deploy it to a domain (rather than a market), I know that it really has been deployed and tested.

For example, the standard greeting example on the Context Gadgets page uses OpenID ("openIdRealm") and was written before OAuth 2.0:

https://developers.google.com/gmail/contextual_gadgets

OpenID is not allowed in OAuth 2.0:

https://developers.google.com/apps-marketplace/practices#3_use_oauth20

Your application should not use OpenID or OAuth1.0. Any evidence of such use will result in your application being unable to complete the review process.

Please note that context gadgets are Javascript client applications that are very different from web server applications and installed applications. Therefore, OAuth 2.0 should be used as follows:

https://developers.google.com/accounts/docs/OAuth2#clientside https://developers.google.com/accounts/docs/OAuth2UserAgent

But contextual gadgets run in a container that processes the first OAuth call (google call, which calls our site with tokens ...). Living on the client side, contextual gadgets "cannot keep secrets." our site (redirect page, https://example.com/oauth2callback ) should save the access token (and, possibly, update the token) to the session available for our gadget code on the client side.

Ideally, I would not use SSO, which, as I see it, "is only needed for applications placed on the market." An alternative deployment is β€œfor your domain,” which uses the Google Apps Extension Console :

https://developers.google.com/google-apps/extensions-console/

But the extension console says, from the top: β€œWe're improving the user interface, try the new developer console,” which refers to:

https://console.developers.google.com/?redirected=true

Developer Console :

  • It shows a project that was created earlier in the application extension console. I can click on it to open a large menu (to the side, left).
  • API and Auth / Credentials - I created a client identifier and a secret for my application. Apparently, I should use web applications, not a service account or an installed application, because I'm trying to access some user data (email access), not just a Google service, and I'm not a standalone installed application .

It is not possible to report this customer ID anywhere in the context gadget. Is it registered and forgotten?

Also (bug?), The permissions show my client ID in the Service Account section, even if I did NOT create the service account credentials.

And then this: I don’t know how to deploy my contextual gadget (which is not a standalone application) in my domain from this new developer console. It seems that there are only cloud deployment related options and the Compute tabs on the left.

When I try to deploy from the application extension console (which is supposedly not deprecated, only improved), I get this error:

Google Apps Marketplace (I never deployed to marketplace, only my own domain) Application installation not allowed. The OAuth1.0 version is no longer available. Instead, try installing the OAuth2.0 version. [Return to dashboard] (button) 

Moreover, returning to the toolbar button leads me to the domain administration site, which allows neither to deploy nor to deploy:

https://admin.google.com/mydomain.com/

By the way, the application extension console never accesses the redirect page I created and never reads the gadget specification on my site (never used Google, as promised), so the error message should indicate manifest.xml does not use OAuth 2.0 ... or the Apps Extensions Console doesn’t use it itself and blames me for it!

So, the Gmail contextual application:

  • Outdated?
  • Impossible now?
  • Authorized with OAuth 2.0? How?
+17
gmail google-oauth gmail-contextual-gadgets
Oct 06 '14 at 17:06
source share
4 answers

There were the same problems. I (barely) managed to add my gadgets to my domain emails by following these steps. Here I can share;

1) Created a project through ( https://console.developers.google.com ). Included in the Marketplace SDK in the API navigation menu. Once it turns on, go to the top of the page and click on the β€œgears” for the Google Apps Marketplace SDK. This will lead you to a page with a link to (go to the source console). Click the link.

2) You must be redirected to the form page. Fill in all the required fields on the form. Check the COB extension and declare your extractor identifier (I used a preliminary canner extractor, I did not check it with special extractors) in the Extractor Url text box, your gadget URL using the Gadget Url text box and select areas. Click the "Add" button and then the "Save Changes" button as soon as you are done.

3) Go to the Access API menu and create an OAuth 2 client ID.

Here, where the steps are not clear to me, but I will tell you what I did to have gadgets available in my domain.

3) I clicked the Test Install Flow button on top of the form.

4) I added a user admin as an editor for this project.

5) Then I had to log out, clear the cache, log in as the admin / domain user to see the context gadget at the bottom of the email.

Hope this helps.

+4
Oct 26 '14 at 22:54
source share

Google Documentation Contextual Gadgets - Bad Prank, Outdated and Wrong, Don't Waste Your Time.

The answers here on SO brought me closer, but I never got this job.

Fortunately, I found gmail.js , which allowed me to write a Chrome extension to do what I needed ...

1- Download the Gmail Chrome Extension Boilerplate project , which is an example of the chrome extension for the chrome example using gmail.js.

2- Update the main function in the main.js file like this:

 var main = function(){ gmail = new Gmail(); gmail.observe.on("open_email", function(id, url, body, xhr) { // Inject a toolbar: var $email_body = gmail.dom.email_body(); $email_body.prepend('<div class="my_toolbar"><a>Do something</a></div>'); }); } 

This will give you the following:

enter image description here

+4
Feb 04 '16 at 3:56 on
source share

The method described at https://developers.google.com/gmail/contextual_gadgets seems to be completely out of date. Even the form in the Google Apps Gadget Console seems outdated.

You need to follow this description: https://developers.google.com/apps-marketplace/preparing

Contextual gadgets are now developed using the API console (rather than the application console), and there is a form for creating extractors, etc.

+2
Dec 23 '14 at 15:11
source share

Please follow these steps:

  • Log in to your Gmail Admin
  • open a new tab and enter http://console.developers.google.com
  • Click the API button in the left pane of Gmail
  • Select the following APIs: I. Gmail API
    II. Google Marketplace API
    III. API Calendar
    intravenous google admin SDK
  • After enabling all of the above APIs, please open the Google Apps Marketplace SDK and click on the "Configure" link (you must create a customer ID).
  • Fill in the data with the appropriate data, you also need to upload images of the appropriate size.
  • Fill in all Required fields and add extractors as suggested by Google.
    i) the parameter name must match the contextual API, and the value for all should be ". *" otherwise the gadget will not appear in gmail
  • Enable Universal Service URL
  • Enable COB Extension
  • Add Gtext Extractors Gmail, you can add several extractors for the gadget, but the gadget url should be the same as for all extractors
  • You can add multiple areas for each extractor.
  • Save all changes.

What all!

You can use the link below for reference: https://developers.google.com/apps-marketplace/preparing

0
Oct. 15 '15 at 11:35
source share



All Articles