google-api

Google Cloud Translate - 403 Forbidden Missing API key

我与影子孤独终老i 提交于 2020-01-03 04:58:10
问题 I have gone thru the Google cloud transalte API and decided to use Java platform for my application Based on the documents, tested the below code with required jar's. this code working fine in my eclipse Translate translate = TranslateOptions.getDefaultInstance().getService(); String name = rs.getString("name"); Translation translation1 = translate.translate(name); String TransalateName = translation1.getTranslatedText(); However when export this code into a jar and running in Shell script

Google places add place INVALID_REQUEST error

余生颓废 提交于 2020-01-03 04:54:26
问题 I create post POST https://maps.googleapis.com/maps/api/place/add/json?sensor=false&apiKey HTTP/1.1 Content-Type: application/json Host: maps.googleapis.com Content-Length: 100 Expect: 100-continue Connection: Keep-Alive {"location":{"lat":"50.873884","lng":"20.650160899999946"},"accuracy":50,"name":"new place name"} I am getting HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8 Vary: Accept-Language Date: Wed, 14 Sep 2011 14:02:25 GMT Server: mafe Cache-Control: private X-XSS

Dialogflow v2 Nodejs Client Library UpdateIntent when adding Training Phrases

此生再无相见时 提交于 2020-01-03 03:31:10
问题 I am trying to use the updateIntent function that is part of the Dialogflow v2 Client library for Node.js . The reason I am trying to use it, is to be able to add training phrases to an intent. I cannot seem to get passed this one. Here is the code I am using for it!: My GetIntent Function: async function getIntent(intentId) { try { let responses = await intentsClient.getIntent({name: intentId, intentView: 'INTENT_VIEW_FULL'}) const response = responses[0] // console.log(response) return new

QPX Express API from Python

一个人想着一个人 提交于 2020-01-03 03:20:14
问题 I am trying to use Google's QPX Express API from python. I keep running into a pair of issues in sending the request. At first what I tried is this: url = "https://www.googleapis.com/qpxExpress/v1/trips/search?key=MY_KEY_HERE" values = {"request": {"passengers": {"kind": "qpxexpress#passengerCounts", "adultCount": 1}, "slice": [{"kind": "qpxexpress#sliceInput", "origin": "RDU", "destination": location, "date": dateGo}]}} data = json.dumps(values) req = urllib2.Request(url, data, {'Content

Google Safe Browsing HTTP POST - 403 response

我的未来我决定 提交于 2020-01-03 02:58:13
问题 I'm working on a program that queries Google Safe Browsing for certain urls, but I'm getting an error that I don't think I should be getting. I'm sending the following request: 2 http://google.com http://facebook.com via POST to: https://sb-ssl.google.com/safebrowsing/api/lookup?client=api&apikey=[KEY]&appver=1.5.2&pver=3.1 However, I'm getting a 403 response. This is what the documentation says for HTTP POST lookup errors: The server generates the following HTTP error codes for the POST

Google Drive api upload fails

蓝咒 提交于 2020-01-03 02:20:09
问题 I would like to upload a file from an url to google drive chunked but I am getting an error. I've tested it with a local file and it works. What's wrong with this? Here's my code: <?php require_once __DIR__ . '/vendor/autoload.php'; require_once __DIR__ . '/GoogleApi.php'; if (php_sapi_name() != 'cli') { throw new Exception('This application must be run on the command line.'); } /** * Get a chunk of a file. * * @param resource $handle * @param int $chunkSize * * @return string */ function

Google Contacts API - Accessing Other Users

一曲冷凌霜 提交于 2020-01-03 02:01:48
问题 I am trying to use the Google Contacts API and the Python / GDATA client handlers to access Contacts via OAuth 2.0 for users in the domain. I'm ultimately wanting to create a web service to add contacts for users, but the first step is getting this test working. I can access my own Contacts just fine if I use the default URI. However, when I pass in the email address to construct the URI for another user, I can't seem to access the other user's Contacts. Here is the code that I'm using:

Why does the 'Free/Busy' time for Google Calendar API come back 'Undefined'?

a 夏天 提交于 2020-01-03 01:59:32
问题 I'm new to and learning both Javascript and Google Script, and I'm trying to write a script that checks if a calendar is busy at a certain time. According to https://developers.google.com/google-apps/calendar/v3/reference/freebusy/query, this should be returned in the format: { "kind": "calendar#freeBusy", "timeMin": datetime, "timeMax": datetime, "calendars": { "busy": [{"start": datetime,"end": datetime}] } } However, I'm using the following code (Simplified to reproduce the issue):

Using Google Calendar API V3 with .net framework 3.5

久未见 提交于 2020-01-02 19:28:13
问题 I am using a Web application which uses .Net 3.5 framework. It uses the Google calendar API V1. When searched in google forums it was found that the Google calendar API V1 & V2 are deprecated and should use V3. Google Calendar API V3 platform support is .NET Framework 4 and 4.5 So should our application be upgraded to .NET framework 4 or 4.5 ? Or is there is any solution for using google calendar API in .Net 3.5 framework ? 回答1: Question: Google Calendar API V3 platform support is .NET

get Google Credential throws Unhandled Exception

前提是你 提交于 2020-01-02 16:18:06
问题 On My Xamarin.forms Portable Project, I am trying to read information from google sheet: using (var stream = this.Assets.Open(@"clientsecret.json")) { var secrets = GoogleClientSecrets.Load(stream).Secrets; //I get the secrets correctly credential = GoogleWebAuthorizationBroker.AuthorizeAsync( secrets, Scopes, "user", CancellationToken.None, new FileDataStore(credPath,true)).Result; } I get Unhandled Exception System.AggregateException: One or more errors occurred. when the complier trying to