google-api

Google doc viewer doesn't work with Amazon s3 signed urls

不问归期 提交于 2020-01-11 06:36:06
问题 I try to display a .doc file stored on a S3 bucket inside an iframe thanks to google doc viewer api. I already did some research and found this, which i tried to apply here : var encodedUrl = encodeURIComponent("http://myAPI.com/1d293950-67b2-11e7-8530-318c83fb9802/example.docx?X-Amz-Algorithm=AWS4-HMAC-SHA256%26X-Amz-Credential=GNRO0BLDYAJP1FU7ALIS%2F20170717%2Fus-east-1%2Fs3%2Faws4_request%26X-Amz-Date=20170717T145429Z%26X-Amz-Expires=600%26X-Amz-SignedHeaders=host%26X-Amz-Signature

Analytics Reporting v4 with API key

China☆狼群 提交于 2020-01-11 05:45:10
问题 I need to integrate a very basic report from Google Analytics in the dashboard page of a CMS web application I'm building with asp.net web forms (C#). I remember I was able to do it on a test made in 2015 with API V3, but now, with V4, I get always an error message that OAuth2 is needed for authentication. I need to access to a specific analytics account I own, not the account of the user that navigate in the CMS! So I use the API KEY given by Google API Manager. I have given to that API Key

Node.js Google Drive api Download file error

不羁岁月 提交于 2020-01-11 05:43:11
问题 This is my code: const fs = require('fs'); const { google } = require('googleapis'); const Auth = require('../authorization/auth_drive/auth'); // get data var gotData = function downloadFiles(fileId, callback) { let content = fs.readFileSync('./GEARS/authorization/client_secret.json'); Auth(JSON.parse(content), (auth) => { //const returnData = []; const drive = google.drive({ version: 'v3', auth }); const fileId = ''; const dest = fs.createWriteStream('./test_files/test.png'); drive.files.get

Google Maps PHP CURL issue “Your client has issued a malformed or illegal request. That’s all we know.”

ε祈祈猫儿з 提交于 2020-01-11 05:15:48
问题 I have a function which returns the coordinates of an address using CURL and the Google Maps API. The code is as follows: function get_coordinates($address_string) { $address = urlencode($address_string); $url = "https://maps.googleapis.com/maps/api/geocode/json?address=" . $address . "&key=" . $api_key; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_PROXYPORT, 3128); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

Google API Python unauthorized_client: Unauthorized client or scope in request

戏子无情 提交于 2020-01-11 04:43:46
问题 I get this error when trying to run my code: oauth2client.client.AccessTokenRefreshError: unauthorized_client: Unauthorized client or scope in request. Here is my code: import json import requests import httplib2 from oauth2client.client import SignedJwtAssertionCredentials from apiclient.discovery import build if __name__ == '__main__': json_key_file = 'my-key.json' with open(json_key_file) as json_file: json_data = json.load(json_file) credential = SignedJwtAssertionCredentials(json_data[

Google Service Account Authentication with Json file

与世无争的帅哥 提交于 2020-01-10 19:15:14
问题 I have been following the Oauth2 Service account documentation on Googles website. I have also been picking apart Googles .net client libray trying to get this to work. I have reached the Computing the signature stage. The privacy key from Google looks like this -----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDcmuyQC8rwWdPQ\nmIdksgzSJbVWTU5MeUxy+HAap3yut9wR/L6KGMJ4FBYcsPmXN5gQAhErybavGoZG\nfS1X1/PCpPVpTCA4749K8gbvuZg1JEIAqMtmHiBBrJj5l8eiekQc8pd7Pq35H4wi

PHP Oauth signature_invalid

允我心安 提交于 2020-01-10 11:45:29
问题 I can't wrap my brain around why this isn't work... I really think it should be. Please help. Here is the error I get: signature_invalid base_string:GET&https%3A%2F%2Fwww.google.com%2Faccounts%2FOAuthGetRequestToken&oauth_callback%3Dhttp%253A%252F%252Fnoveis.net%252Fauthsub%252Findex.php%26oauth_consumer_key%CONSUMER KEY HERE%26oauth_nonce%3D3bafa031c03f6d1590f2539091245270%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1282159845%26oauth_version%3D1.0%26scope%3Dhttps%253A%252F

HTTP Google Sheets API v4 how to access without OAuth 2.0?

匆匆过客 提交于 2020-01-10 10:11:52
问题 my idea is to create a google sheet, make it public and then access it from my work computer linux/bash to read/write values on a daily basis. i have a public google doc sheet that anyone can find/edit. this is the sheet ID: 1F6jh6756xNDlDYIvZm_3TrXb59EFEFHGEC7jdWz-Nx0 doing it by the book https://developers.google.com/sheets/api/samples/reading curl 'https://sheets.googleapis.com/v4/spreadsheets/1F6jh6756xNDlDYIvZm_3TrXb59EFEFHGEC7jdWz-Nx0/values/Sheet1!A1:A3' returns: { "error": { "code":

Google Speech Recognition API

你离开我真会死。 提交于 2020-01-10 09:39:50
问题 I'm trying to use the Google Speech API v2 (at address https://www.google.com/speech-api/v2/recognize?... ) I need to use my Api Key, but when I use it I get error 403 Forbidden When I use an API key that was on the example project I downloaded it is working fine. I saw that at the Google Developers Console I can enable a lot of api options, but didn't find any Speech-API option. Is there anything else I need to enable to get access to this API using my key? Thank you! 回答1: Instructions are

Google Speech Recognition API

我是研究僧i 提交于 2020-01-10 09:39:31
问题 I'm trying to use the Google Speech API v2 (at address https://www.google.com/speech-api/v2/recognize?... ) I need to use my Api Key, but when I use it I get error 403 Forbidden When I use an API key that was on the example project I downloaded it is working fine. I saw that at the Google Developers Console I can enable a lot of api options, but didn't find any Speech-API option. Is there anything else I need to enable to get access to this API using my key? Thank you! 回答1: Instructions are