google-api

Google API PHP Refresh Token returns NULL

a 夏天 提交于 2020-01-02 03:23:07
问题 I'm using the Google APIs Client Library for PHP for offline authentication, but when I use this code: $this->google->refreshToken($result["google_refresh_token"])); it returns NULL. $this->google refers to an instance of the Google_Client class. Anyone an idea what this could be? If I try to change the given refresh token it returns a Google Exception Error, so it should be a valid token. Thank you! Edit: 'client_id' => 'myclientid', 'client_secret' => 'myclientsecret', 'redirect_uri' =>

How to embed Google Speech to Text API in Python program?

被刻印的时光 ゝ 提交于 2020-01-02 01:57:05
问题 I have a project in which I have created a chat program between a client and host, and I have to embed Speech to Text in it. Is there any way by which I can embed Google Speech to Text API in my program ?? 回答1: This is probably what you do not want to use in your case, but for other's who may need this for a one-off project, I hacked together a simple python client a while ago that uses the APIs built into Chrome for voice search: https://github.com/korylprince/python-google-transcribe For it

Google Drive API - Fetch Shared Files Download Links

回眸只為那壹抹淺笑 提交于 2020-01-01 19:30:31
问题 I am new to Google Drive and have uploaded many files. I have changed the status of all files to be shared if the download link is known. I would like to use PHP to generate a list of all of the direct download links for the files. The PHP script is run on my localhost and I just need the array to be saved to a text file to be used later. I have had a very hard time trying to get Oauth working but came across this script that looks like what I need. I set up my service account and have my

Google Maps API V3 and Local search problem - empty results?

送分小仙女□ 提交于 2020-01-01 19:21:27
问题 I am trying to implement a Maps API V3 and Local Search but I seem to be having problems. Somehow, the results in the OnLocalSearch() function is empty. Here is my complete code: <script type="text/javascript"> //<![CDATA[ $(document).ready(function() { // do stuff when DOM is ready var geocoder = new google.maps.Geocoder(); var address = '{{string_location}}'; var map; // Our global state for LocalSearch var gInfoWindow; var gSelectedResults = []; var gCurrentResults = []; var gLocalSearch =

How to retrieve result for Google QPX with Javascript/jQuery (Ajax)?

江枫思渺然 提交于 2020-01-01 18:53:08
问题 I have already signed up for Google API Console and set up the account and API key, but my question is how do I retrieve the results from Google QPX. What causes the error below? Setting up the json Query for Google Request var FlightRequest = { "request": { "slice": [ { "origin": "DCA", "destination": "LAX", "date": "2015-02-11" } ], "passengers": { "adultCount": 1, "infantInLapCount": 0, "infantInSeatCount": 0, "childCount": 0, "seniorCount": 0 }, "solutions": 20, "refundable": false } }

Retrieving data from a Google spreadsheet in an Android app

落花浮王杯 提交于 2020-01-01 17:04:12
问题 I am developing an Android App that has to retrieve data from a Google spreadsheet. I have found posts online that suggest that I use the Google drive API but I haven't found any example on how this can be done. Can someone please help me with an example on retrieving data from a Google spreadsheet using the Google Drive API? Thanks 回答1: The Drive API will only allow you to download the spreadsheet file. If you want to retrieve cell data from within a spreadsheet you must use the older

Unauthorized interaction with google calendar API v3

不想你离开。 提交于 2020-01-01 15:43:42
问题 I'm in the same situation as this guy (only that my problem is with python): I'm trying to retrieve data using a service account (using this example and after reading this blog entry since my application is a google app) but I get hit with a login required error and I cannot understand why. Let me represent it with a whole example: In [1]: import httplib2 In [2]: from apiclient.discovery import build In [3]: from oauth2client.client import SignedJwtAssertionCredentials In [4]: f = open(

Unauthorized interaction with google calendar API v3

喜欢而已 提交于 2020-01-01 15:43:34
问题 I'm in the same situation as this guy (only that my problem is with python): I'm trying to retrieve data using a service account (using this example and after reading this blog entry since my application is a google app) but I get hit with a login required error and I cannot understand why. Let me represent it with a whole example: In [1]: import httplib2 In [2]: from apiclient.discovery import build In [3]: from oauth2client.client import SignedJwtAssertionCredentials In [4]: f = open(

Google api to fetch the location history of a user

家住魔仙堡 提交于 2020-01-01 09:33:10
问题 I am looking for a google api to fetch the user location history, I know google is storing users location history and we are able to track it from - https://maps.google.com/locationhistory/b/0 But is google providing an api through which we can access this user history through an app, I think google latitude used to that only but I am not sure and any ways it is shut down. 回答1: As far as I'm aware there is no API that achieves what you're after. I don't even think the latitude API provided

NullPointerException only after I have setServiceAccountUser() for GoogleCredential object (Grails/Java)

安稳与你 提交于 2020-01-01 09:28:25
问题 I receive a NullPointerException with very little detail when I attempt to setServiceAccountUser(ACCOUNT_TO_IMPERSONATE) on my GoogleCredential , build a Google Tasks Service Object and subsequently try to send a request for a list of Tasks from ACCOUNT_TO_IMPERSONATE . def credential = new GoogleCredential.Builder() .setTransport(HTTP_TRANSPORT) .setJsonFactory(JSON_FACTORY) .setServiceAccountId(SERVICE_ACCOUNT_ID) .setServiceAccountPrivateKeyFromP12File(P12_FILE) .setServiceAccountScopes