google-api

Why YouTube API Scopes error happens on the Windows Server?

有些话、适合烂在心里 提交于 2020-06-23 16:00:10
问题 I am using YouTube API to get the data and for a month there is an error when I try to make a request on a Windows Server 2012 R2, (local works). Basically, before the script makes a request he updates a YouTube token in order not to perform a log on into Google Account. The function loads a pickle file with the credentials and updates them if necessary. The error happens on the line "creds.refresh(Request())" by drilling down by scopes- def main_load_page(youtube, API_VERSION, SCOPES, CLIENT

Why YouTube API Scopes error happens on the Windows Server?

牧云@^-^@ 提交于 2020-06-23 15:59:11
问题 I am using YouTube API to get the data and for a month there is an error when I try to make a request on a Windows Server 2012 R2, (local works). Basically, before the script makes a request he updates a YouTube token in order not to perform a log on into Google Account. The function loads a pickle file with the credentials and updates them if necessary. The error happens on the line "creds.refresh(Request())" by drilling down by scopes- def main_load_page(youtube, API_VERSION, SCOPES, CLIENT

How to solve common errors in Google Apps Script development [closed]

两盒软妹~` 提交于 2020-06-22 10:42:26
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 9 days ago . Improve this question The Q&A is currently a subject of meta discussion - please, do participate. Current plan is to split where possible (and no canonicals exist) into separate Q&As. The answer to the question is a community wiki and the question intended to become one when the

Google Drive Api - Error after copying multiple files .NET - Cancel connection by remote host

一世执手 提交于 2020-06-17 14:20:18
问题 Console application below return exception after copying many files. I'd like to know the exactly limit of copying and creating folders with Google drive api in .NET. Follow the Inner Exception: "Unable to read data from the transport connection: Was Forced to cancel the exist connection by remote host". static void Main(string[] args) { if (Debugger.IsAttached) CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.GetCultureInfo("en-US"); string[] Scopes = { DriveService.Scope

Google Drive Api - Error after copying multiple files .NET - Cancel connection by remote host

一个人想着一个人 提交于 2020-06-17 14:20:08
问题 Console application below return exception after copying many files. I'd like to know the exactly limit of copying and creating folders with Google drive api in .NET. Follow the Inner Exception: "Unable to read data from the transport connection: Was Forced to cancel the exist connection by remote host". static void Main(string[] args) { if (Debugger.IsAttached) CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.GetCultureInfo("en-US"); string[] Scopes = { DriveService.Scope

How can I query multiple URL's with Google Safe Browsing API using Powershell?

╄→尐↘猪︶ㄣ 提交于 2020-06-17 04:21:39
问题 The script below works fine to check a single URL, but what is the simplest way to check a list of URL's in one query? Turning $URL into an array doesn't work (only the first entry is checked). $HEADERS = @{ 'Content-Type' = "application/json" } $GOOGLE_API_KEY='[API Key]' $Uri = 'https://safebrowsing.googleapis.com/v4/threatMatches:find?key='+ $GOOGLE_API_KEY $URL = 'http://www.sitetocheck.com' $BODY = @() $BODY +=[pscustomobject]@{"client" = @{"clientId" = "company"; "clientVersion" = "1.0"

How can I query multiple URL's with Google Safe Browsing API using Powershell?

流过昼夜 提交于 2020-06-17 04:19:47
问题 The script below works fine to check a single URL, but what is the simplest way to check a list of URL's in one query? Turning $URL into an array doesn't work (only the first entry is checked). $HEADERS = @{ 'Content-Type' = "application/json" } $GOOGLE_API_KEY='[API Key]' $Uri = 'https://safebrowsing.googleapis.com/v4/threatMatches:find?key='+ $GOOGLE_API_KEY $URL = 'http://www.sitetocheck.com' $BODY = @() $BODY +=[pscustomobject]@{"client" = @{"clientId" = "company"; "clientVersion" = "1.0"

Error Status 400 When Uploading to Youtube API v3

偶尔善良 提交于 2020-06-16 17:58:26
问题 I keep getting an error when trying to POST to Youtube v3 API. I'm trying to get a response URI, so I can upload a Youtube video. This is the documentation I'm referencing: https://developers.google.com/youtube/v3/docs/videos/insert#go Does anyone know what I'm doing wrong? Error log is below. My code: axios({ method: 'POST', baseURL: 'https://www.googleapis.com', url: '/upload/youtube/v3/videos', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'Content-Length':

Google Translate API authentication key and usage

一笑奈何 提交于 2020-06-14 10:00:40
问题 From https://cloud.google.com/translate/docs/basic/setup-basic, there's a need to set the environmental variable: export GOOGLE_APPLICATION_CREDENTIALS='/path/to/credential.json' Then a curl request can be made as such: curl -s -X POST -H "Content-Type: application/json" \ -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \ --data "{ 'q': 'The Great Pyramid of Giza (also known as the Pyramid of Khufu or the Pyramid of Cheops) is the oldest and largest of the

Flutter Google Calendar Api list Events

这一生的挚爱 提交于 2020-06-12 15:23:20
问题 Flutter, Google Calendar API v3 https://pub.dartlang.org/packages/googleapis Works: Future<List<Event>> getEvents() => calendarApi.events.list("primary", ) .then((Events events){ return events.items; }).catchError((e){ print("error encountered"); print("${e.toString()}"); }); Doesn't work: DateTime start = new DateTime.now().subtract(new Duration(days: 10)); DateTime end = new DateTime.now().add(new Duration(days: 10)); .. Future<List<Event>> getEvents() => calendarApi.events.list("primary",