IMPORTANT: Picker API change may have broken your application

3,947 views
Skip to first unread message

Jon Emerson

unread,
Feb 22, 2014, 12:28:10 AM2/22/14
to google-p...@googlegroups.com

Hi everyone,


If you are already using the Picker API with OAuth 2.0, you can skip reading.  However, if the Picker API is no longer working properly in your application, the following may apply to you.


Effective this past week, we now require OAuth tokens for everyone requesting Views that deal with user data. We had to bring this change forward from the planned date of April 15th in order to help mitigate a security exposure.


What to do?

  • Obtain the OAuth token by following the instructions here. Make sure you pass the appropriate scopes while obtaining the token depending on the Picker Views you are creating.

  • You can see the list of scopes for different Picker Views here.

  • Pass the obtained OAuth token to the instance of google.picker.PickerBuilder using its setOAuthToken method. This method should be called before PickerBuilder.build() is called.

See example.


We apologize for the inconvenience. If you have any problems in your migration to OAuth authentication, please post to the forum and we'll help you through it.


Thanks,

Google Picker API Team


Kuntal Loya

unread,
Feb 26, 2014, 4:43:48 AM2/26/14
to google-p...@googlegroups.com
Hi everyone,

Please note, even if the Picker API is working for you now, although you are not passing the OAuth tokens needed for requesting Views dealing with user data - it would stop working after March 15, 2014.

Please let us know if you face any issues in migrating to OAuth authentication.

Thanks,
Google Picker API Team

--
You received this message because you are subscribed to the Google Groups "Google Picker API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-picker-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Geoff McQueen

unread,
Feb 26, 2014, 6:06:44 AM2/26/14
to google-p...@googlegroups.com, kun...@google.com
Hi Kuntal/Jon,

This change has caused us a lot of grief; I'm trying to set up our new OAuth credentials BUT the wizard for the JavaScript origins is now allowing a wildcard. Since our clients come from addresses like https://client1.affinitylive.com and https://client2.affinitylive.com I'm worried that this forced use of OAuth combined with a restriction forbidding wildcards means we'll have to remove Google Drive Picker functionality from our application.

Geoff

Tiyab Konlambigue

unread,
Feb 26, 2014, 5:02:48 PM2/26/14
to google-p...@googlegroups.com
Thanks to post this information... but it's hard to know this change without having trouble with our app online. As Geoff  said this change has caused us a lot of grief... because we don't had prior notice about this change.

Geoff McQueen

unread,
Feb 26, 2014, 8:43:19 PM2/26/14
to google-p...@googlegroups.com
We've just published a blog post for our users (feel free to reuse or refer to it if your users are frustrated too): http://www.affinitylive.com/company/blog/google-drive-files-in-attachments/

Kuntal Loya

unread,
Feb 27, 2014, 7:58:16 AM2/27/14
to google-p...@googlegroups.com
Hi all,

We really apologize for the inconvenience.

Regarding wildcards in Javascript origins - you should be able to add multiple origins, one per line which should probably help.



Geoff McQueen | AffinityLive

unread,
Feb 27, 2014, 8:43:54 AM2/27/14
to google-p...@googlegroups.com
Yeah, nah. Not a chance. We've got thousands of them - every client gets their own subdomain. We sign up dozens of new ones a day. Isn't. Going. To. Fly. 
--
Geoff McQueen
Founder & CEO
__________________________________________________________________________________________________________________________________________________________________________________________________

Office: +1 800.425.7315
Cell: +1 650.450.4384
Skype: geoffmcqueen

Geoff McQueen | AffinityLive

unread,
Feb 27, 2014, 8:45:07 AM2/27/14
to google-p...@googlegroups.com
If we put in the value as a specific domain, can you change it to be a wildcard on your back end, or do your systems ignore the wildcard value at processing time? This is a massive shortcoming... many many many business SaaS product use custom subdomains for their clients.

Kuntal Loya

unread,
Feb 27, 2014, 6:20:34 PM2/27/14
to google-p...@googlegroups.com
Hi Geoff,

There another approach that some of the Picker API users have used in an exact same scenario like yours -
instead of hosting the picker directly in the client domain, host it in some other domain (say my-fixed-domain.com) which can be iframed inside your client's domains. Something like this -
client domain -> my-fixed-domain.com in an iframe -> my-fixed-domain.com loads the picker
Your Javascript origins would then contain my-fixed-domain.com

Hope this helps.

Kuntal Loya

unread,
Feb 27, 2014, 6:22:25 PM2/27/14
to google-p...@googlegroups.com
In case you use this approach, make sure you pass the right 'origin' to the picker using pickerBuilder.setOrigin(<client domain>)

Geoff McQueen

unread,
Feb 27, 2014, 6:45:09 PM2/27/14
to google-p...@googlegroups.com, kun...@google.com
Thanks Kuntal; is the JS file fairly stable (don't want to be playing whack a mole chasing updates if you guys are still making changes to it)?

Kuntal Loya

unread,
Feb 27, 2014, 7:41:56 PM2/27/14
to google-p...@googlegroups.com
The picker API is fairly stable, but let us know if you see any breaking changes.
Also, any important and potentially breaking changes will always be announced on this group.

Thanks for working on this.

Roman Steiner

unread,
Feb 28, 2014, 11:10:46 AM2/28/14
to google-p...@googlegroups.com
Hello,

I'm getting a "Invalid credentials (missing or invalid oAuth token)" error even when I'm not trying to access user data. 
Specifically this is my code:

google.load('picker', '1', {callback: pickerReady});
// ... 
var picker = new google.picker.PickerBuilder()
.addView(google.picker.ViewId.MAPS)
.setCallback(function(data) {
            if(data.action == 'picked') {
            // ...
              }
             })
        .build()
        .setVisible(true);

The only View I'm adding is google.picker.ViewId.MAPS which shouldn't need an oAuth token ( https://developers.google.com/picker/docs/#otherviews ).
Is this the expected behavior? 

thanks, 
Roman 

Roman Steiner

unread,
Feb 28, 2014, 1:02:57 PM2/28/14
to google-p...@googlegroups.com
PS: also adding .setDeveloperKey("...") doesn't change anything.

Kuntal Loya

unread,
Feb 28, 2014, 2:27:34 PM2/28/14
to google-p...@googlegroups.com
Hey Roman,
Thanks for pointing it out, this is not expected - we'll get it fixed.


Kuntal Loya

unread,
Feb 28, 2014, 11:48:50 PM2/28/14
to google-p...@googlegroups.com
Hey Roman, the issue should be fixed now.

Roman Steiner

unread,
Mar 1, 2014, 4:36:23 PM3/1/14
to google-p...@googlegroups.com, kun...@google.com
Hey! 
Thank you! It's working now :)

Damiano Venturin

unread,
Mar 28, 2014, 12:33:36 PM3/28/14
to google-p...@googlegroups.com, kun...@google.com
Hello Kuntal

I've exactly the same problem as Geoff and this change is really annoying.  

The solution with the iframe doesn't look appealing to me and it's a lot of (unplanned) work.

Questions:
  • Do you plan to solve this issue with subdomains somehow in the future versions?
  • If yes, when?
  • Is there a way to update the Javascript Origins set in the control panel via API? 
  • Are there limits in the number of Javascript Origin entries?
Thank you

Geoff McQueen | AffinityLive

unread,
Mar 28, 2014, 4:57:51 PM3/28/14
to google-p...@googlegroups.com
yeah, its all pretty ghetto - we've worked around it now but is frustrating to require all the extra steps when a user just wants to get a file as an alternative to the "browse" dialog. Google Drive/Docs had a great advantage here that helped us push our users in that direction, but now it has taken a number of steps back. The lack of wildcards just makes it even more miserable and sticky taped together; so different to other experiences with Google that might launch early/rough but get better, this one is a regressive step from a usability standpoint at least.


For more options, visit https://groups.google.com/d/optout.

Damiano Venturin

unread,
Mar 28, 2014, 6:21:32 PM3/28/14
to google-p...@googlegroups.com


On Fri, Mar 28, 2014 at 5:57 PM, Geoff McQueen | AffinityLive <geoff....@affinitylive.com> wrote:
yeah, its all pretty ghetto - we've worked around it now but is frustrating to require all the extra steps when a user just wants to get a file as an alternative to the "browse" dialog. Google Drive/Docs had a great advantage here that helped us push our users in that direction, but now it has taken a number of steps back. The lack of wildcards just makes it even more miserable and sticky taped together; so different to other experiences with Google that might launch early/rough but get better, this one is a regressive step from a usability standpoint at least.

I agree but let's see if Google can surprise us with some good news :-)

Northern Gwinnett

unread,
Mar 29, 2014, 1:41:21 PM3/29/14
to google-p...@googlegroups.com
Hi Jon,

For those of us who are not programmers and have simple plugged Google code into sites hosted by other services (I use Weebly), is there any way to fix this problem? I'm not computer illiterate (well, by Google standards I am), but I don't understand how I can fix this on my end. Is this something the hosting service would have to address or is there a way I can do it?

Northern Gwinnett

unread,
Mar 29, 2014, 1:45:06 PM3/29/14
to google-p...@googlegroups.com
I should've specified - the issue I am having is with an embedded Google Group. I'd like to be able to insert images in posts, but can't because of this issue.

Kuntal Loya

unread,
Apr 1, 2014, 8:35:13 AM4/1/14
to google-p...@googlegroups.com
There's nothing that you can do for that right now. We are working on getting that fixed soon.

Sorry for the trouble.


Northern Gwinnett

unread,
Apr 1, 2014, 9:45:08 AM4/1/14
to google-p...@googlegroups.com, kun...@google.com
Thanks for the response Kuntal. I appreciate it.

Alex Yumas

unread,
Apr 4, 2014, 2:05:34 PM4/4/14
to google-p...@googlegroups.com
We also a SaaS app (this one - http://www.jitbit.com/hosted-helpdesk/ ) and we also use subdomains for our accounts. BUT we also offer our customers to use a CUSTOM DOMAIN for their app (like many many other saases do).

So thanks for screwing this up, Google. We've removed the google-drive feature from our app completely for now.:(

Sweaney

unread,
Jun 26, 2014, 2:36:19 PM6/26/14
to google-p...@googlegroups.com
Invalid credentials (missing or invalid oAuth token)

I have this problem with Google Picker API in my local project while trying to attach a file on GDrive.
But I don´t understand that changed?
Can you help me please? What is the specific change and how to fix it in my code?

It is not clear to me the other responses in this group.

Andy Gee

unread,
Jun 27, 2014, 5:48:16 PM6/27/14
to google-p...@googlegroups.com
Hi, I've set up a picker from the dev docs last week. How can I tell if I'm already complying with this change?
Reply all
Reply to author
Forward
0 new messages