Is there a way to levearge Google Drive API to allow your application to create Google Docs from within your own system? - google-api

We were using an Iframe, then we started to use the API for Google Drive. We want to allow users to create a Google Doc from within our system w/o leaving our application. Does anyone know if this is possible?

Insert a new file with one of the Google Docs mimeTypes and wait for the response.
POST https://developers.google.com/drive/v2/reference/files/insert
{ "mimeType": "application/vnd.google-apps.document" }
Once response arrives, it'll contain an attribute called embedLink. Use embed link on iframe.
All available Google Docs mime types are on https://developers.google.com/drive/mime-types

Related

Activities API call not returning correct results

The below api call used to return a feed of results that would have been on my homepage.
https://content.googleapis.com/youtube/v3/activities?home=true&maxResults=50&part=id%2Csnippet%2CcontentDetails&key=AIzaSyC0wL6aecu2rxiTNtW8uvtnb1kx9Kdlb4s
In the past day or so the feed I get has changed to be only videos from some channel called "Popular on YouTube".
Does anyone know why this API call changed? Is it a bug? Is there a different way to get an authenticated user's activity feed?
It turns out the home parameter for the activities api endpoint has been deprecated.
https://developers.google.com/youtube/v3/docs/activities/list
Sounds like you must have been using a shared API key.
Either case, "Popular on Youtube" is a Youtube channel by Youtube. Something has broken functionality and I believe it is referrer issue. With that, I suggest getting a new API Key.
You can learn more about and getting a free personal API Key, if you haven't done so. https://developers.google.com/youtube/v3/docs/errors

Transferring ownership of a specific Google Doc file using google-api-ruby-client

I'm looking to transfer ownership of a specific Google Docs file using the Google Apps API. There are many accounts on a single Google Apps domain. There are many files I would like to transfer so I do not want to do it manually.
In the UI I've only seen the ability to transfer ownership of all files from a particular user rather than individual files.
I've looked through the GitHub page for the google-api-ruby-client gem, but I was unable to come up with a solution. Can someone point me in the right direction or post an example?
You'll need to use the Google Drive API. Specifically the Permissions "update" method.
First find/get the File ID, using the Files.List method, which will allow you to search using a query. Then use the Permissions.Update (or Patch) method, making sure to set the transferOwnership parameter to True.
Full documentation is here: Google Drive API - Permissions

Google places Api Key

I have searched through here for other questions related to the same topic and cannot find a definite answer.
My problem seems the same as many others in that I cannot get a response from Google Places Api.
I am trying from within an iphone app, yes the code is correct , I have checked and in desperation just resorted to wiping out the code to just make a request using the examples provided by the Docs on Google Places.
Tried putting the url into a browser, always the same response, whichever browser.
{
"html_attributions" : [],
"results" : [],
"status" : "REQUEST DENIED"
}
I have tried making new keys, same result and yes the identifer for the app is also listed.
Is there a time frame before being able to use the key.
Here how I've done this
1)You need to login with your google account
2)Google APi Console will Appear
3)Look out at Screenshot
4)you will find Services over there ,click on it where you can have choose API you would like to use
5)then go to API Access as shown in you can get your Google API Key.
Thanks
Advice -use your own Google API key
You probably need 'sensor' parameter in your request URL, I guess.
Just set 'sensor=false&' in the URL and try it.
In order to use the google place API, you need to do the following steps on https://console.developers.google.com:
You need to go your project.
1: Activate Google places API depending upon your clients: iOS, Android or web.
2: Then go to the Credentials section on the left.
3: Generate a SERVER key.
Insert that key into your google place api call. Example:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=cruise&key=SERVERKEY
Its a simple GET Rest call.
instead of this
The url: https://maps.googleapis.com/maps/api/place/search/json?location=-74.006605,40.714623&radius=5000&types=bar|police&name=&sensor=false&key=Api_key
use this
The url:
(https://maps.googleapis.com/maps/api/place/search/json?location=-74.006605,%2040.714623&radius=5000&types=bar|police&name=&sensor=false&key=Api_key)
%20 is for space

Google Places API Email/Website

Is there a way to get Email/Website of a particular place using Google Places API? If this is not possible is there a way other than using Google API?
To retrieve a places website address using Google Places API, you could perform a Places Autocomplete Request with the input parameter value set to the name of the place: e.g.input=Amoeba
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Amoeba&sensor=false&key=your_api_key
Then using the reference from the response you could perform a Places Details Request: e.g.
reference=ClRMAAAAVzPUTLym999EXs4mKkpTqEmzX0a2kfXCUs4enTvWMHDd06VLvlzsGOdfrRd2QvkiRWs4sNkraAAJlMdytt4O4kYGoJZn4ENL5Ig5QYyeJmMSECDOGMO1MnDFtqzdqD8oDk0aFJr8_s-Y946QOz24YubPUsmoC2vl
https://maps.googleapis.com/maps/api/place/details/json?reference=ClRMAAAAVzPUTLym999EXs4mKkpTqEmzX0a2kfXCUs4enTvWMHDd06VLvlzsGOdfrRd2QvkiRWs4sNkraAAJlMdytt4O4kYGoJZn4ENL5Ig5QYyeJmMSECDOGMO1MnDFtqzdqD8oDk0aFJr8_s-Y946QOz24YubPUsmoC2vl&sensor=false&key=you_api_key
This would return the details for Amoeba including if available, the parameter website which would contain the places website address.
Google Places API provides Details requests and responses using your API key.
The tag allows for the google places url for that places
e.g.
http://maps.google.com/maps/place?cid=10704550479004381649
If you wish to harvest website, fax and opening hours information, it can only be done here.
There is no direct api in the Google Places API that will provide that info.
Just as addressComponents are part of the Details response, i assume tags will be added to the Place Details responses from the API to address this problem.
I have been trying to use Google Places API, and I have successful queries, fetching Places details, which has all the address information for the place I want to find, but ironically, there is NO WEBSITE attribute in the returned JSON!
The first version of Local search was MUCH better, and always accurate for searches when you know the business name.

gData API - "This feed is read-only" error when adding to Google Calendar

I'm using Google Apps for my domain, and trying to enable access to the calendar on my website.
The problem is that I get This feed is read-only error every time I try to add an event to the calendar. Here's where I post to: Link (dead link)
You're using the basic feed, which according to the documentation is always read-only. Use a feed URL ending in private/full or private/full-noattendees instead.
(Disclaimer: I work for Google, and as part of implementing the calendar side of Google Sync I've had some experience of working with the GData APIs, but anything I write here must be taken to be the views of a private individual rather than as official Google policy etc :)

Resources