google-api-client

Caused by: java.lang.IllegalStateException: GoogleApiClient is not connected yet

只谈情不闲聊 提交于 2019-12-01 16:15:21
I am getting this error message when trying to implement logout for Google Sign-In for Android: Caused by: java.lang.IllegalStateException: GoogleApiClient is not connected yet. The crash occurs in DrawerActivity.java (below), where I call the signOut() method. I've looked at the solutions in other posts and have tried them to no avail: java.lang.IllegalStateException: GoogleApiClient is not connected yet GoogleApiClient is not connected yet exception Fatal Exception: java.lang.IllegalStateException GoogleApiClient is not connected yet MainActivity.java: protected void onCreate(Bundle

Insufficient authentication scopes error using Google API

安稳与你 提交于 2019-12-01 15:36:40
I set up Google SDK to use Google API with Application Default Credentials . For my local machine, created a credentials json file and set its path as GOOGLE_APPLICATION_CREDENTIALS as environment variable. This is worked as expected without a problem. However, when the app is deployed to Google Cloud VM, it throws the following error: [Google_Service_Exception] { "error": { "code": 403, "message": "Request had insufficient authentication scopes.", "errors": [ { "message": "Request had insufficient authentication scopes.", "domain": "global", "reason": "forbidden" } ], "status": "PERMISSION

Caused by: java.lang.IllegalStateException: GoogleApiClient is not connected yet

こ雲淡風輕ζ 提交于 2019-12-01 15:13:52
问题 I am getting this error message when trying to implement logout for Google Sign-In for Android: Caused by: java.lang.IllegalStateException: GoogleApiClient is not connected yet. The crash occurs in DrawerActivity.java (below), where I call the signOut() method. I've looked at the solutions in other posts and have tried them to no avail: java.lang.IllegalStateException: GoogleApiClient is not connected yet GoogleApiClient is not connected yet exception Fatal Exception: java.lang

Insufficient authentication scopes error using Google API

故事扮演 提交于 2019-12-01 14:35:37
问题 I set up Google SDK to use Google API with Application Default Credentials. For my local machine, created a credentials json file and set its path as GOOGLE_APPLICATION_CREDENTIALS as environment variable. This is worked as expected without a problem. However, when the app is deployed to Google Cloud VM, it throws the following error: [Google_Service_Exception] { "error": { "code": 403, "message": "Request had insufficient authentication scopes.", "errors": [ { "message": "Request had

youtube api v3 search by developer tag

萝らか妹 提交于 2019-12-01 12:39:27
my app upload video to youtube, i need user see what other user upload (or in another word search by developer tag). i'm use this way https://developers.google.com/youtube/v3/docs/videos/insert to upload videos. i saw this link to show how to do this but in version 2.0, i'm use v3 https://developers.google.com/youtube/2.0/developers_guide_protocol_uploading_videos#Assigning_Developer_Tags i need simple explanation how to attach developer tag in v3 thanks ahead You can set categoryId while inserting the video. That id will represent a videoCategory . 来源: https://stackoverflow.com/questions

Google OAuth2 API. Check user has two factor authentication (Not GSuite)

六眼飞鱼酱① 提交于 2019-12-01 11:43:29
I use scopes: https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email but result data of: https://www.googleapis.com/oauth2/v1/userinfo https://www.googleapis.com/oauth2/v3/tokeninfo not contains info about exist two-factor auth on google account. Can I get boolean or another value about it? Sorry we don't expose If a user has 2 factor auth or not) through API. We have been thinking about this for a while. We have been doing a lot of things to improve the security for all users (including the ones who have not enabled 2nd factor). This is based on the

How to add a dropdown list to google sheet using Google Sheets API python

China☆狼群 提交于 2019-12-01 10:53:47
问题 Using Google Sheets API python How to add a dropdown list to google sheet with list items [YES. NO, MAYBE] for an invite asking friends if they will attend an event. I looked at google developer sheets api documentation HERE and no example was provided. Looking for the JSON structure. The result would be something like this : Thank you! 回答1: I found the trick inside the setDataValidation property and choosing ONE_OF_LIST as the condition type and all I had to do is providing the list of items

Use Google Drive Api in Laravel 5

流过昼夜 提交于 2019-12-01 08:52:35
I'm a newbie in Laravel, and surely this question has an obvious answer, but I've not been able to connect Laravel 5 with Google Api. I have install the Api with composer like always, and it is in my vendor folder, but now I'm not sure how to use it. I've not found an answer to this (because this must be extremely simple). Probably I'm missing a namespace call, or something like this. On my IndexController, I have: <?php namespace App\Http\Controllers; class IndexController extends Controller { /** * Show the application welcome screen to the user. * * @return Response */ public function index

Use Google Drive Api in Laravel 5

丶灬走出姿态 提交于 2019-12-01 07:13:50
问题 I'm a newbie in Laravel, and surely this question has an obvious answer, but I've not been able to connect Laravel 5 with Google Api. I have install the Api with composer like always, and it is in my vendor folder, but now I'm not sure how to use it. I've not found an answer to this (because this must be extremely simple). Probably I'm missing a namespace call, or something like this. On my IndexController, I have: <?php namespace App\Http\Controllers; class IndexController extends Controller

pull queues authorization from compute

烂漫一生 提交于 2019-12-01 03:27:57
I'm trying to access a pull queue from google compute with the compute OAuth token using python from oauth2client import gce from apiclient.discovery import build import httplib2 credentials = gce.AppAssertionCredentials('') http = httplib2.Http() http=credentials.authorize(http) credentials.refresh(http) service = build('taskqueue', 'v1beta2', http=http) tq=service.taskqueues() tq.get(project=MY_APPENGINE_PROJECT, taskqueue=PULL_QUEUE_NAME, getStats=True).execute() I keep getting HttpError 403 "you are not allowed to make this api call" please help, what configure have I missing? thanks, Shay