Google file picker returning 401 error - oauth-2.0

Hi I am developing web application and i am trying to implement google file picker api. I have created project in google developer console. I have created API key and OAUTH 2.0 Client ID. I am following http://seanamarasinghe.com/developer/google-picker-with-drive/.
I have attached sample screen shot.
When i upload files i get error The API developer key is invalid. I am running the application in localhost as http://localhost:11726/FilePicker.html.
I have entered http://localhost:11726in origin. Please find below screen shot.
May i get some help to fix this? Thank you in advance.

That's easy. Remove .setDeveloperKey(developerKey) code from your createPicker() function. I don't know why Google is adding this API here exactly, but it is not needed as you already have the OAuthClientID. If you remove that part, your quickstart sample will work.

Related

Google OCR Addon G1ANT Studio

While using the google OCR addon in the G1ANT Studio, I fount that even after entering appropriate API Key or JSON Credentials, I was unable to log into my google cloud service account and it kept giving me an error saying that the entered credentials were incorrect.
Anyone else experiencing a similar problem? Please help out!
PS: I've already enabled the Google vision API in the developers console under a specified project name.
Thanks in Advance!
I found a solution to this problem by using the API key instead of JSON Credential and also by a slight alteration in the code, as shown below:
ocrgoogle.login chrome apikey "Your API Key"
as you can see, we have to enter chrome (application name) for the command to run as intended.
Have fun!

Fitbit oauth2 public API stopped working. Giving error - Sorry Its not you.. Its us

Few months back I prepared a demo on Fitbit oauth2 public APIs in which I used to log in with a particular user and get his activities. It was working fine. But recently, I opened the demo and tried to log in with the same user but it is not getting logged in and repeatedly giving me this error.
I tried to change the client secret key of this demo app which I registered on Fitbit but nothing happened. I am stuck here.
There is problem with the format of Callback URL. I think Fitbit has recently changed it.
Earlier, the format of Callback URL was "demoapp://" but now
it will be "demoapp://something"
Please refer to my answer on other question.
Setting up Fitbit api in xcode Swift

Google 400 Error: invalid request Custom scheme URIs are not allowed for 'Web' client type

When I am signing into Gmail in my iOS App, I am getting the below error (screenshot) and the sign-in fields do not appear. We are loading the sign-in screen in a WKWebView.
We are using a custom URI redirect but why is google throwing this error now. What are the alternatives to a custom URI?
Swift 2.3 project
Using OAuthSwift v0.6.0 cocoapod
This started quite recently only in the past week or so I believe something changed with Google's APIs.
I have read that google is deprecating webviews for OAuth and will block requests on April 20, 2017. As seen here in a Google Developers Blog:
https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html
Does this mean I already need to use or is there another viable solution? I thought I had more time before needing to update this.
My guess is that your client is registered incorrectly in Google Cloud Console. A 'WEB' client is typically a server or Javascript application. An iOS app should be registered as an iOS client.
https://developers.google.com/identity/protocols/OAuth2InstalledApp#creatingcred
I Just found this problem too.
Please check google developer console and look at the credentials keys
Your Client ID in google-info plist must come from iOS application, not the web.
And use that Client ID to be revereseClientID and copy it in to URI type
I have solved the problems by create project in Fire Base Because REVERSED_CLIENT_ID generate from developers.google.com Incorrect.
Try create your project in FireBase
https://console.firebase.google.com
you must cross check clientId at your 'Google Dashboard' clientId and clientId at "GoogleProject.Plsit".if both are different, copy ClientID from 'Google Dashboard' and paste it on "GoogleService-Info.Plsit".and also amend your reverseClientId in "GoogleService-Info.Plsit" according to newly pasted ClientID(you check the pattern how reverseClientId created from client Id in "GoogleService-Info.Plsit"). And then paste thid reverseClientId in 'URL type' in your project setting.
In case of mine clientId on "GoogleService-Info.Plsit" and my 'Google Dashboard' were different.
chech your google dashboard here : https://console.developers.google.com/apis/credentials?project=firebase
I just experienced this issue following the Google Signin for iOS Guide. The plist generated file is not the good one. You need to take a look at the clientID and reversedClientID and be sure that they are the ones for the iOS app on your Google developer portal.
I faced this error after previously creating a GoogleService-Info.plist file using the site Google Sign In directs you to. I later started using Firebase, which seems to create a separate .plist file. After attempting to include Firebase's new .plist file, my Google Sign In button started yielding the invalid_request error with the Custom scheme URIs are not allowed for WEB client type message.
In order to fix the problem I tried many things, but in the end deleting MY ENTIRE Firebase project on their web console (not just the individual app), recreating a new Firebase project from scratch, and re-downloading the new .plist file, solved the error.
It creates two client ID. one for web and one for iOS application. Web client will be in the google plist by default. So it gives the above error. Use iOS Client id from google console or create credential for iOS application.
For my experience, I had followed Google's SignIn iOS Swift guide and had downloaded a Web OAuth JSON file. They literally provide you the wrong Plist file for an iOS setup.
Just in case somebody else runs into this issue here are the steps I followed:
Go to the Google Developers console.
Go to the Credentials section.
Notice there are two items in the "OAuth 2.0 client IDs" section. (If you previously attempted to configure an iOS Google SignIn project.
Click on the name of the "iOS client for ".
Click "Download PLIST File".
Delete the Google web Plist file from your project.
Drop in the new iOS based Plist file.
Copy over the new REVERSED_CLIENT_ID into your URL Types of the Info page of your project. (This is detailed in Google's guide).
Attempt to run your app again.
Note: I got the Google Sign In API to work with Swift v3 and XCode v8.
I was getting the same error. Then I figured out, that I did not provide my app Bundle Id to access the Google Sign In Service in my app.
You do that from the page with the link:
https://developers.google.com/mobile/add?platform=ios&cntapi=signin&cnturl=https:%2F%2Fdevelopers.google.com%2Fidentity%2Fsign-in%2Fios%2Fsign-in%3Fconfigured%3Dtrue&cntlbl=Continue%20Adding%20Sign-In
1.Sign in with your Google Developer account.
2.Create you app name and copy the App bundle Id from your project from:
Project and Target List> General> Bundle Identifier.
3.Choose your Country
4.Enable Google- Sign In.
Then perform the necessary steps to integrate Google Sign In in with your iOS App.
I was facing the same issue. I followed all the instructions to integrate my app several times, and played with the code to see if there was any hidden issue in the code.
I downloaded and configured the sample app from google at github https://github.com/googlesamples/google-services and go the same issue, so it was not the code.
It seemed like there is something in my console configuration so I switched between different google console apps, and played changing the bundle IDs.
The only thing that managed to fix this issue was to use Firebase instead. I created an app in the firebase console, downloaded the new plist, and it worked.
Still not sure why this didn't work for me in the first place, this doesn't seem to be a common problem, but I hope this helps someone.
cheers,
Kindly check console.developers.google.com/apis/credentials for your project and see whether there is already a client_id in OAuth 2.0 client IDs section , if so then copy that client id and replace it with you GoogleService-Info.plist file's CLIENT_ID and accordingly change REVERSED_CLIENT_ID (in reverse manner) now clean and build your app and test it will work
I was using Meteor with Cordova and Meteor's official google integration, which relies on cordova-plugin-googleplus.
I had to:
create both an iOS and a web Client ID
use the web Client ID on the settings / server / database as documented
but then use the reverse of the iOS web client as the REVERSED_CLIENT_ID for cordova-plugin-googleplus
Expo, authentication with Google.logInAsync from expo-google-app-auth
In my case I just used androidClientId instead of androidStandaloneAppClientId

Unable to be connected to Quickbooks through Intuit App Centre | Playground

Does this link work?
https://appcenter.intuit.com/Playground/OAuth/IA
I am trying to get my QB online token secret required for working with a ruby gem. I have a valid QB account and I have entered my app's consumer key & secret. All I am trying to do is follow the instructions required to get the example app working from
https://github.com/minimul/qbo_api
Every time I click on the Connect to Quickbooks button, I just get an error message.
Oops! An error has occurred.
Please close this window and try again.
Error Code: no_access_to_this_field
Message: Team Intuit IA Application not allowed to get access to QuickBooks
I have changed the urls in my app and I still cannot get past the error message. I am at a loss since this seems to be a very basic step to start working with the gem. Please tell me the newbie mistake I am making.
Is there any other SDK I need to install? I do not have a Desktop version...just the online version.
So if anyone here happens to not figure out this answer already, its because I set the "Access Token Duration:" option on the Intuit Playground to 120 seconds...the default option.
I changed it to 1200 seconds by mistake, and the login works just fine now! I don't understand why that works, so if someone could answer that I could understand it better!
Thanks #William Lorfing
This can happen if you are using the playground to generate Oauth tokens for either QuickBooks or Payments access and you are not setting the correct data source.
See the answer here: https://intuitdeveloper.lc.intuit.com/questions/1247785
regards
Jarred

Update thumbnail without asking for google login - Youtube API V3.0 - OAuth2.0 -

My goal is quite simple : Use php files that will log on my youtube account and upload custom thumbnails.
I already successfully used Youtube API V2 to upload videos with no problem,
but the V3 requires OAuth2.0, and I can't found a way to avoid my server keeps ask me "Please login from your google account"
I use the example from the official place, here :
And created my OAuth token (tried web application and service) but it keeps ask me to log in...
I only want the php files to log on alone, because I want to share them to some friends that will be able to change thumbnails without having a google acount or knowing my youtube/google password.
You can do so by getting a refresh token from OAuth2 Playground and setting it in your youtube object.
Here it explains a little more.
And a step by step video.
Thank you Ibrahim, it solved my problem :) !
Except you didn't mentionned that I had to use $client->refreshToken('Refresh Token'); and then start the conditional : if ($client->getAccessToken()) { [...] . Very important to the others one who could encounter the problem : You need to use google developper console https://cloud.google.com/console and specify in APIs & Ath > Credentials the exact adress of your PHP script, and set a product name and email address in Consent Screen.

Resources