How to get the document ids of all documents accessible by a user in google drive? - google-api

I tried using the Google Document List API "https://docs.google.com/feeds/default/private/full?max-results=100&showfolders=true" for fetching list of all files and documents accessible to a user.
But got the Error as - "Invalid request URI".
Please can anyone explain what is it that I am missing?

Try appending ?v=3 at the end or alternatively you can add an HTTP header GData-Version: 3 That should fix it.
This is because this API endpoint only works with the latest version of the Document List API and, by default the API uses v1. So you get the same error as you you were using ?v=1

Related

How to download drive files through HTTP requests with the access_token included in the url?

Can someone please help me on finding a way to send an HTTP request to Google Drive to download a file with the access token included in the url?
I searched a lot in the internet and found only this way to send an access_token in URL:
"https://www.googleapis.com/drive/v3/files/[fileID]?access_token=ya29.a0AfH6SMA4FU********&key=[apiKey]"
As you know, it only returns the metadata of the file because it does not contain alt=media. If you add "alt=meida" to the url, it fails to load and returns nothing.
It can be easily fixed with passing the access_token as a header. However, I cannot do that because I am using the url as a "src" of HTML and as a source for video segments in .m3u8 file.
Any suggestion?
Since January 1st, 2020, the Google Drive API doesn't support the access_token query parameter anymore.
See https://cloud.google.com/blog/products/application-development/upcoming-changes-to-the-google-drive-api-and-google-picker-api for the announcement.
This change only applies to requests with ?alt=media by the way. Unfortunately that's precisely the kind of requests that you're using...
I'm afraid there's no solution in your case.

Add Trello Card results in "Error - Malformed URL:"

I'm using ruby-trello gem for creating cards in a Trello list.
For my testing credentials this works fine, for the credentials I use on a production setup I get "Trello::Error - Malformed URL:"
The "Malformed URL" is a direct response from Trello, and I can't get my head around why, and how to fix this.
There is little to no documentation on API response errors by Trello.
Maybe you should watch what you application is sending to Trello.
You should also aread the API that Trello offers and search for the specific request and its response. Also you can probe if the Keys are correct in Trello's Sandbox.
As last option write an issue on Github's gem or ask for assistance to Trello.
Hope it helps.

Full text search using Google Sites API gives 500 internal server error

I tried incorporating the full text search using the Google Sites API (via a service account) but to no effect. I also tried it on the Google Oauth playground, but I get 500 Internal server error in both the cases.
I am using https://sites.google.com/feeds/content/domainName/siteName?q=test as the URL.
However, I do get a 200 OK when I fire https://sites.google.com/feeds/content/domainName/siteName (without a query string) in the Google Oauth playground.
Please guide me if I am doing anything wrong.
Thanks

Google fee load API returning empty rss entries

I have generated the following rss feed which validates correctly with w3:
http://www.ppsgroup.co.uk/blog/rss
validation here
http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.ppsgroup.co.uk%2Fblog%2Frss
However when I try to make an API call
https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=100&q=http://www.ppsgroup.co.uk/blog/rss200
(I've added a number at the end of the url because it seems google caches the response)
I get either an empty entries field or a 400 error.
Any idea what is wrong with the rss feed or how can I debug the api call?
This was working until recently so I'm not sure if something changed on google's side.

Google map places service is giving REQUEST

I am using google place api for places sugestions.
https://maps.googleapis.com/maps/api/place/textsearch/json?query=ari&sensor=false&key=your_api_key
I have valid api key and this URL is working fine when I am executing it from the browser.
The api return "OK" as status and places suggestion but when I am executing the same URL by cUrl or file_get_contents It returns "REQUEST_DENIED" as status and hence no place suggestions.
why this is behaving like this.
Is there any setting which I am missing.
Any suggestion would be a great help.
Thanks
Did you ever get your answer to this? As far as I am aware this is die to "cross-site-scripting" security limits. You can't go from the Places API directly to Google even though you can in a browsers address bar. You have to make the call back to your sever and have the server send the call to Google - then return those results back to your page/ web site.

Resources