google-api

Google login API: force to type password?

非 Y 不嫁゛ 提交于 2020-07-16 04:15:34
问题 I'm using several social providers on my site, including Google. I would like to ask for password to Google account each time user requests one of my actions. This is for security reasons. With Facebook, we can send auth_type=reauthenticate parameter. Is there something like this in Google API? I'm not looking for refreshing tokens, I need to make sure user types his password at any state: whether already authenticated or not. 回答1: I read your posts and I can relate to your frustration on

Google login API: force to type password?

倖福魔咒の 提交于 2020-07-16 04:15:08
问题 I'm using several social providers on my site, including Google. I would like to ask for password to Google account each time user requests one of my actions. This is for security reasons. With Facebook, we can send auth_type=reauthenticate parameter. Is there something like this in Google API? I'm not looking for refreshing tokens, I need to make sure user types his password at any state: whether already authenticated or not. 回答1: I read your posts and I can relate to your frustration on

redirect_uri_mismatch the redirect URI in the request does not match the ones authorized for the OAuth client

醉酒当歌 提交于 2020-07-15 08:22:28
问题 I have following client secret { "web": { "client_id": "testid", "project_id": "testproj", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://www.googleapis.com/oauth2/v3/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_secret": "test-sec", "redirect_uris": [ "https://localhost:8080/oauth2callback" ] } } and I am getting "Error: redirect_uri_mismatch The redirect URI in the request, http://127.0.0.1:8414/authorize/, does

How to update permissions in Google Drive API v3?

给你一囗甜甜゛ 提交于 2020-07-13 15:44:12
问题 I uploaded wav file using service account, service account created the file, service account is the owner: metadata = {'name': filename, 'parents': [FolderId]} media = MediaFileUpload(filepath, mimetype='audio/wav') r = drive.files().create(body=metadata, media_body=media, fields='id').execute() {'permissions': [{'deleted': False, 'displayName': 'My name', 'emailAddress': 'myemail@gmail.com', 'id': '00654354190098938408', 'kind': 'drive#permission', 'photoLink': 'https://lh6.googleusercontent

How to update permissions in Google Drive API v3?

China☆狼群 提交于 2020-07-13 15:40:27
问题 I uploaded wav file using service account, service account created the file, service account is the owner: metadata = {'name': filename, 'parents': [FolderId]} media = MediaFileUpload(filepath, mimetype='audio/wav') r = drive.files().create(body=metadata, media_body=media, fields='id').execute() {'permissions': [{'deleted': False, 'displayName': 'My name', 'emailAddress': 'myemail@gmail.com', 'id': '00654354190098938408', 'kind': 'drive#permission', 'photoLink': 'https://lh6.googleusercontent

How to create local post on google using PHP MyBusiness API?

本小妞迷上赌 提交于 2020-07-11 06:51:20
问题 I want to create local post on google using google's PHP My Business API V4. Sample code is below $mybusinessService = new \Google_Service_MyBusiness($client); $local = new \Google_Service_MyBusiness_LocalPost(); $path = $locname.'/localPosts'; $response = $mybusinessService->accounts_locations_localPosts->create($path,$local); where $locname is string of accounts/locations id. above code throws exception 'Request contains an invalid argument.' I want to know that how to create post or post

Script fails on SpreadsheetApp.openById - Requires permission

让人想犯罪 __ 提交于 2020-07-09 08:54:12
问题 I have an onOpen function that creates a custom menu in a spreadsheet. It's been working fine for over a year, but a couple days ago it stopped working. When I look at the execution transcript I get: "Execution failed: You do not have permission to call SpreadsheetApp.openById. Required permissions: https://www.googleapis.com/auth/spreadsheets" This fails/relates to the below line of code: var ss = SpreadsheetApp.openById("myID") I've checked what API's are enabled, and I have Sheets enabled,

How to set GOOGLE_APPLICATION_CREDENTIALS in spring boot app

折月煮酒 提交于 2020-07-09 07:51:46
问题 I am attempting to use the google vision library in java. The steps specify that I need to setup my auth credentials in order to start using the this library . I was able to generate my json property file from API Console Credentials page and I placed it in my spring boot app in the resources folder. I think updated my application.properties file to include the value like so: GOOGLE_APPLICATION_CREDENTIALS=datg-avatar-generator-9dc9155cd5bd.json I'm also setting my property source in my

How to solve “idpiframe_initialization_failed” for localhost?

感情迁移 提交于 2020-07-08 11:00:10
问题 Here's my initialization code: function HandleGoogleApiLibrary() { // Load "client" & "auth2" libraries gapi.load('client:auth2', { callback: function () { // Initialize client & auth libraries gapi.client.init({ apiKey: 'My API Key', clientId: 'My Client ID', scope: 'https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/plus.me' }).then( function (success) { console.log("Yaaay"); }, function (error) { console.log("Nope

How to solve “idpiframe_initialization_failed” for localhost?

痞子三分冷 提交于 2020-07-08 10:59:06
问题 Here's my initialization code: function HandleGoogleApiLibrary() { // Load "client" & "auth2" libraries gapi.load('client:auth2', { callback: function () { // Initialize client & auth libraries gapi.client.init({ apiKey: 'My API Key', clientId: 'My Client ID', scope: 'https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/plus.me' }).then( function (success) { console.log("Yaaay"); }, function (error) { console.log("Nope