Gmail contextual gadget - google-apps-marketplace

I guess question one is - is it actually possible to create a contextual gadget for gmail right now?
I have spent the last 2 days solid reading the (very out of date) documentation backwards and forwards, and every forum post I could find on the topic. I have tried everything I and see nothing, not even a hint of an error message that might point me in the right direction.
These are the steps I have been following, starting at the start, and going step by step when logged into my google apps domain as admin.
1) In google drive, created a new TestGadget.xml file, shared it publicly across the whole web and copied the contents of the Hello World example code from here https://developers.google.com/gmail/contextual_gadgets into it.
2) In https://console.developers.google.com deleted the previous attempts and created a new project and named it.
3) Once project was created, went to API's (6 were already enabled, have also tried with them removed), clicked Google Apps Marketplace SDK and enabled it.
4) Once enabled, went to API Configuration for Google Apps Marketplace SDK, and go to original console.
now in the apis console -
5) Clicked API Access, then clicked the big blue "Create an OAuth 2.0 client ID"
6) Gave it a name (used the same name as the project, not sure if that matters?) then next, and created clientID settings for both Web Application and Service Account (not really sure what a contextual gadget needs).
7) Went to Google Apps Marketplace SDK options.
Added a description
Added 4 icons
Cleared the checkbox for "Allow individual install"
Added a URL (http://www.google.com) for the TOS just to keep it happy
8) In the extensions section, checked the Universal Navigation Extension, and again pointed it at www.google.com (have to have either this or the drive extension, but neither make sense for a contextual gadget?!)
9) Enabled COB extension.
Extractor URL - google.com:HelloWorld
Gadget URL - https://drive.google.com/file/d/0B9LL5RYGoC4GUUFFU1FtOXpWSms
Param Name - hello (have tried #hello, and other combination too just incase)
Param Value - .*
Scopes - Mail - Subject line, Mail - Message Body
and Saved changes. In other attempts I have tried different extractors from the documentation, and changed the gadget code to match, using the param name specified there e.g google.com:EmailBodyExtractor with email_body and always .* for the value
10) Click Test installation flow , get the grants page appear, agree to conditions, turn ON for my domain, and accept. Then click next next next thru the next bit agreeing to send notifications out.
11) Went to https://admin.google.com/AdminHome?fral=1#AppsList:serviceType=MARKETPLACE , and the app was listed there. Checked the settings, and Data access was granted, and it was ON for everyone.
12) Sent myself an email from a different account sprinkled liberally with 'hello world' in the subject and body.
13) Logged into gmail with https://mail.google.com/mail/u/0/?nogadgetcache=1
... and nothing
14) Bang head against wall. HARD !
15) repeat last 2 steps with a non admin user - still nothing (and no notification of the app either)
16) return to wall . . . . .
What am I missing?

Finally got it working.
The problem was hosting/linking to the gadget on google drive.
With the exact example above, I ftp'd the gadget to my website and linked to it there, and it all started working.
This however is a really annoying way to work, and I have seen a lot of other examples that claimed to use a document on google drive, so is there a proper way to use google drive to host a gadget during development?

Related

Google Drive API Console: Error saving Drive UI integration page

I have a webapp in production that interacts with Google Drive through Google Drive API.
I need to change some settings in Drive interaction but I can't save.
When I save the Drive UI integration page, I receive this error:
There's a problem at our end.
Please try again. If the problem persists, please let us know using
the "Send feedback" link below. Thanks!
(spying Network console: there is an Internal Server Error in a POST call)
I tried to send feedback for months: nobody answers and the bug is still there.
I tried also to create another project: I can save the first time but then the bug returns.
How can I do? Has someone the same problem?
Is there a way to receive a reply from Google? Is there some workaround?
Thank you.
i think that problem must be Client ID
before adding Client ID, go to the Credentials -> OAuth 2.0 Client IDs
then select edit your Client ID. after that your production site url add to Authorized JavaScript origins and Authorized redirect URIs.
then enter your Client ID in Drive UI integration page
For myself trying to get the Drive UI configured I noticed a couple of errors (that don't have any specific error messages)
When adding in an Open URL it has to be a valid domain, so for instance I tried to test it out with local host, to no avail. However something like https://devbox.app.com worked, but something like https://localhost:8888 does not. Even though https://localhost is a valid javascript origin in the client_id configuration (at least for the app I am working on, not sure about other apps), localhost doesn't work as an open URL.
When adding in the mimeTypes it needs to be in the format */* and can include custom mimeTypes like application/custom+xml and application/custom-name+json not sure for other custom types that are not in a particular format like xml or json. Also not sure about wildcards.
When adding in file extensions do not add in the '.' just the name of the file extension.
The app icon I found only failed to upload the image when the image wasn't the exact dimensions, I actually ended up editing some icons in photoshop to change the pixel x pixel values as a quick work around during dev.
That worked for me to get it to save and I tested it with a file that had a custom mimeType (application/custom-name+xml specifically) and custom file extension!

Cannot upload hosted content for In-App purchases to iTunesConnect

I am trying to upload hosted content for in-app purchases, however I have been unable to succeed so far.
I have previously uploaded around 100 in-app purchases packages for my app using Application Loader. I used to be able to upload these packages before without any issues. Now I’ve noticed that the latest version of Application Loader (Version 3.0) doesn’t even give me the option to upload hosted content (see attached)?
So instead I’ve taken the time to use the iTMSTransporter bash script instead. However when I try to upload the content packs using:
iTMSTransporter -m upload
I am getting the following error:
Package Summary:
1 package(s) were not verified because they had problems:
/Users/Cortana/Documents/iOS/Clients/AccentKit/InAppContent/854413379.itmsp - Error Messages:
ERROR ITMS-90320: "The archive for In-App Purchase 'com.accentkit.AustraliaFemale1' is invalid. The 'IAPProductIdentifier' in the ContentInfo.plist must match the In-App Purchase Product ID."
[2018-04-14 07:12:45 MYT] DBG-X: Returning 1
I’ve double checked and the value for IAPProductIdentifier on the ContentInfo.plist matches exactly with what’s setup on the In-App Purchase Product ID on iTunesConnect. (see attached screenshots) This error is making no sense to me.
Any ideas?
If there was an issue with banking and your sales contract are according to you theoretically back in effect, they may not be effectively back in effect, that is, from Apple's servers point of view.
perhaps this is a process that takes up to a week and the only way to speed it up is to call their technical support.
this is where that'll happen : https://developer.apple.com/support/technical/
I suspect it's likely that your app having been on monetary lockdown at any one point while the bank was an issue may have led into this buggy situation that apple may not have accounted for or that they have accounted for and want you to first go through their IT support process in order for them to first be able to asses that everything is in order.
cheers! :)

Google API authentication: Not valid origin for the client

When making an auth request to the Google API (gapi), it's returning false on the checkOrigin.
I have removed any client id's or anything that would link directly to my account and replaced it with a regex indicating what the data is for reference.
Url: https://accounts.google.com/o/oauth2/iframerpc?action=checkOrigin&origin=https%3A%2F%2Flocal.tools&client_id=(\d{21})
My origin url is a local url, which is https://local.tools
Result: {valid: false}
I'm using the example found here without deviation (except for replacing clientid with my 21 digit clientid): https://ga-dev-tools.appspot.com/embed-api/third-party-visualizations/
The items I'm trying to display show up nicely on the demo site, but aren't getting past the Not valid origin for the client error on my local.tools site.
Clear your browser cache. Started getting this error in Chrome and then I created a new client id and was still getting the issue. Opened firefox and it worked, so I cleared the cache on Chrome and it started working.
I received the same console error message when working with this example: https://developers.google.com/analytics/devguides/reporting/embed/v1/getting-started
The documentation says not to overlook two critical steps ("As you go through the instructions, it's important that you not overlook these two critical steps:
Enable the Analytics API [&] Set the correct origins"), but does not clearly state WHERE to set the correct origins.
Since the client ID I had was not working, I created a new project and a new client ID. The new project may not have been necessary, but I'm retaining (and using) it.
Here's what worked:
Create a new project
Add and Enable the Analytics API
Create a new credential - ensure that it is an OAUTH credential (scroll to the bottom of this page for instructions https://developers.google.com/api-client-library/javascript/start/start-js#Setup).
During creation of the credentials, you will see a section called "Restrictions
Enter JavaScript origins, redirect URIs, or both". This is where you can enter your origins.
Save and copy your client ID (and secret).
My script worked after I created the new OAUTH credential, assigned the origin, and used the newly generated client ID following this process.
try clear caches and then hard reload, i had same error but when i tried to run on incognito browser in chrome it worked.
Key Point: Add both http://localhost and http://localhost:port_number to the Authorized JavaScript origins box for local tests or development.
Credentials do not work if API is not enabled. In my case the next steps were needed:
Go to https://console.developers.google.com/apis/library
Enter 'People'
From the result choose 'Google People API'
Click 'Enable'
Creating new oauth credentials worked for me
You probably use Client ID like this: <CLIENT_ID>.apps.google.com
Make sure your client ID is without ".apps.google.com"
For me - I just went here:
https://console.developers.google.com/apis/credentials
Then chose the right project; then choose the credential with the same ID shown in your console error message. When editing the credentials you can add multiple origins to the white list.
After updated Authorized JavaScript origins browser still caching old data, so I need to Empty cache and hard reload then it works
1. Change Authorized origins
2. Open Dev Tool (F12) then right-click into reload button
Clearing the cache on chrome works!
Please find the steps below to clear the cache.
Open dev tools (Right-click on the page and select inspect/ press F12)
Right-click on the chrome reload button while the dev tool is opened. (You will find the option to clear the cache and reload the site)
clearing the cache works for me.
for React developers try to restart the project otherwise it will show the same error again and again.
It was a referrer-policy problem.
This has been such a pain for a long time to me too...
Found the issue, my website instance had a referrer policy set to
no-referrer. After setting it to no-referrer-when-downgrade, the One
Tap prompt showed up as expected.
https://stackoverflow.com/a/63039142/15565029
If you are using Django, SECURE_REFERRER_POLICY is 'same-origin' by default. Change it by adding the below code in your settings file.
# settings.py
SECURE_REFERRER_POLICY = 'no-referrer-when-downgrade'
https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-SECURE_REFERRER_POLICY
Similar to few answers at above but with screenshots. If you created project for Firebase, may also use the same steps to configure at Google Cloud Platform console.
Select the project at https://console.cloud.google.com/
Navigate to Credentials
Click Edit button for the related OAuth 2.0 Client ID
Add URI into Authorized JavaScript origins
Don't forget to Save
That worked for me after trying for an hour:
On https://console.cloud.google.com/apis/credentials :
Edit Client Outh (mine was: Web Client (Auto Created by Google Service), which was created by my Firebase Web Project)
Enter JavaScript Origin for the Client ID (mine was: localhost:NNNN)
and don't forget to Save.
Try google login for half an hour: didn't work
Enabled Google Analytics as suggested above
Empty Chrome cache and hard reload as suggested above
Try google login for half an hour: didn't work
Sign Out from https://console.cloud.google.com, and sign in again
Empty Chrome cache and hard reload
Now it worked
I don't know which one of the above fixed the problem.
May be it was just a matter of time for cloud.google to
recognize my new JavaScript Origin.
I got the error because of Allow-Control-Allow-Origin: * browser extension.
Trying on a different browser(chrome) worked for me and clearing cache on firefox cleared the issue.
(PS: Not add the hosting URIs to Authorized JavaScript origins in API credentials would give you Error:redirect_uri_mismatch)
I was getting the same error but tried publishing my app and now it shows as below:

How to test Google Plus account existance

I am building a website where a user could specify his social accounts links, I am trying to find a way to test if a google plus account actually exists (social account validation).
I've seen that it is actually possible to test using the GET people/userId but what about curtom urls ? For example if a user has a google.com/+JohnDoe , how would you figure it out? I didn't find anything in the google docs.
It's the same API. GET people/userId and GET people/+JohnDoe both work.
i think google never publish users info or google's huge database, because spammers are searching very hard to that API (for advertising,....)
but you can implement this algorithm:
save ID as string (for example id="mohsensolhnia" or 21 digit number)
redirect to "http://plus.googleapis.com/wm/4/+"+id+"/posts"
if link was wrong you will redirect to "error 404 page"(google page not found) (title is "Error 404 (Not Found)!!1" ;D ;D )
you can do above 3 step with C#/java/phyton/... "selenium webdriver" dll very easy.

MOSS search crawl fails with "Access is denied ..."

Recently the search crawler stopped working on my MOSS installation. The message in the crawl log is
Access is denied. Check that the Default Content Access Account has access to this content, or add a crawl rule to crawl this content. (The item was deleted because it was either not found or the crawler was denied access to it.)
The default content account is an admin on the site collection that I am trying to crawl.
Almost every result for this error on Google tells me to add the DisableLoobackCheck registry key with a value of 1. I have done this and rebooted and the error continues.
The "Do not allow Basic Authentication" checkbox in my crawl rule screen is unchecked.
Is there anything else that could be causing this error? Something with file system or database permissions maybe?
Edit: All signs seem to indicate that the "DisableLoopbackCheck" should fix this, but it doesn't seem to work. Could I be doing something wrong when I enable this?
I'm doing it in My Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa, where I create a new DWORD key called DisableLoopbackCheck and give it the hex value 1.
It turned out not to be related to DisableLoopbackCheck. The problem was that the search was accessing the site through its external URL. You are supposedly not supposed to be able to access a site from within a server using the same URL that you use to reach it from the outside, at least in pre-SP1 MOSS. But I was doing this for about two years somehow. MS Support tells me they don't quite understand how it was ever working. So it looks like I ran into an issue that should have been manifesting all along. I'm not sure what caused it to appear suddenly, maybe some routine patching of the server. The solution was to extend the web application so it was accessible internally through the machine name, then point the crawler at that.

Resources