google-drive-sdk,google-api-client , What is permissionId in Google API?


What is permissionId in Google API?

Question:

Tag: google-drive-sdk,google-api-client

I am trying to replicate the JavaScript client library example shown on https://developers.google.com/drive/v2/reference/permissions/update#examples. There is a reference to permissionId. How do I get this, I've looked everywhere, and my assumption is I am missing something dead obvious.

Thanks in advance.


Answer:

In a REST API such as Drive, every resource has a unique ID. Permissions are the same. When you create a permission, its ID is returned within the response. If you list permissions, you'll see it there. See https://developers.google.com/drive/v2/reference/permissions


Related:


Dynamically Create Folders and Subfolders


php,google-drive-sdk,google-api-php-client
I have several scripts in php to create a folder and upload a file to the desired folder, but I can't seem to be able to create new folders, new subfolders or create another function to do this process. Do i have to use a parent/children specific procedure? Here's the...

Insert file using Google Drive API?


java,google-drive-sdk
Based on Google Drive API reference guiding how to insert file Files.insert // File's metadata. File body = new File(); body.setTitle(title); body.setDescription(description); body.setMimeType(mimeType); // File's content. java.io.File fileContent = new java.io.File(filename); FileContent mediaContent = new FileContent(mimeType, fileContent); try { File file = service.files().insert(body, mediaContent).execute(); // Uncomment the following line to...

How to save my data in a cloud?


google-drive-sdk,cloud,server,dropbox
I don't know if this is possible, but I would like to save some data of my website, like images and documents in a cloud like dropbox or google drive and I want that these data are available and visible to someone looking my site. is it possible? (My intention...

Authorization issue with cron crawler inserting data into Google spreadsheet using Google API in Ruby


ruby,cron,google-api,web-crawler,google-api-client
My project is to crawl the certain web data and put them into my Google spreadsheet every morning 9:00. And it has to get the authorization to read & write something. That's why the code below is located at the top. # Google API CLIENT_ID = blah blah CLIENT_SECRET =...

Cannot Implement GoogleApiClient.ServerAuthCodeCallbacks in android


android,google-api-client,google-login
I am implementing Google plus login system to my android app by following the tutorial of google developer at https://developers.google.com/identity/sign-in/android/sign-in According to the tutorial, I should implement: GoogleApiClient.ServerAuthCodeCallbacks interface to enable server-side API access for the android app. However, 'ServerAuthCodeCallbacks' interface does not exist in the GoogleApiClient library, even in...

Adding google api client to codeigniter


php,codeigniter,google-drive-sdk,google-api-php-client
I want to upload files to google drive using php in codeigniter. First of all i am trying to integrate google api client to codiginator. I have uploaded all the files in to my third_party folder. it look like this I i have created a file called google.php inside my...

Upload text file to Google Drive using Android


java,android,google-drive-sdk,google-drive-android-api
Edited: I have set my text into a string like so: String text = ("Hello!"); I want to turn this into a plain text file and then upload to a Google Drive Folder. I have tried on the code below, but it is not complete so I cannot say what...

Google Drive file download via http


java,android,http,google-drive-sdk
There is a link to Google Drive file accessible to anyone without authentication. Is there any way to download that file using just link and some sort of http client? Most of examples around are relying on Drive API and file IDs, however I'd like to stick with more lightweight...

What is permissionId in Google API?


google-drive-sdk,google-api-client
I am trying to replicate the JavaScript client library example shown on https://developers.google.com/drive/v2/reference/permissions/update#examples. There is a reference to permissionId. How do I get this, I've looked everywhere, and my assumption is I am missing something dead obvious. Thanks in advance....

Google Drive API (GTL) - Create multiple folder paths in order?


ios,objective-c,swift,google-drive-sdk,google-api-objc-client
I'm using the Google APIs Client Library for Objective-C (GTL) to access the Google Drive API. According to it's Introduction to the Google APIs Client Library for Objective-C, Query execution by the service is inherently asynchronous. Which means when you try to create a path like: root/a/b/c, before you can...

Removing permissions of the extensions


javascript,google-chrome-extension,google-drive-sdk,access-token
I have an extension that first asks for permissions to access Google Drive files. The extension is almost empty except in the popup I load this js: chrome.identity.getAuthToken({ 'interactive': true }, function(token) { // Use the token. console.log('Request Token') console.log(token) chrome.identity.removeCachedAuthToken( { 'token': token }, function () {}) console.log('Removed token')...

Google Drive API: I have to fetch only files in that folder without trashed files


c#,c#-4.0,google-api,google-drive-sdk
I am trying to get a list of files in a folder on Google drive using the Google drive API. When I make my request I am getting a list of child elements in that folder including previous deleted files. How do I get only the files that are in...

Google Drive revokes my token


java,google-drive-sdk
I am new to google drive and started with the tutorial quickstart. After numerous attampts I run the program successfully. However I had permission and authorisation problems when I was trying to delete files. Drive service = getDriveService(); service.files().delete("FileId").execute(); So I decide to change the URL in the client_secret.json, From:...

Google Drive API every time asking for authentication code


php,curl,google-drive-sdk
I'm using google drive api to upload a file to google drive using php, but it every time asking me for authentication code fof my application. I have followed the steps given in the URL below https://developers.google.com/drive/web/quickstart/quickstart-php My Code: require_once 'src/Google/autoload.php'; $client = new Google_Client(); // Get your credentials from...

GoogleApiClient null pointer exception


java,android,google-api-client
I try to learn android development and now i developing an app with fused location service. I got a RunFragment.java class when i want to put the GoogleMap fragment, Textviews with latitude and longitude and some other widgets. First of all i want to connect to GoogleApiClient and i created...

401 Unauthorized - Google Drive API


asp.net,.net,vb.net,google-drive-sdk
I'm working with the Google APIs for the first time and I'm having problems trying to download files with the File object "downloadUrl" property. I'm currently using the "Service Account" option with the associated service account email and P12 certificate. However, the URL returned "https://doc-08-68-docs.googleusercontent.com/docs/securesc/bteg36c1tifegg79l2ov17og25612tet/gk7kn52ahe4d0to7d6hte9f0f2hv47e4/1434132000000/11750183130219432819/11750183130219432819/0BziIKv2_NWCxc3RhcnRlcl9maWxl?e=download&gd=true" returns a 401 - Unauthorized...

How to download text file from google drive using the url by the google drive api for android [closed]


android,google-drive-sdk
I have uploaded a text file to my google drive account and it is public. I got the link for that file by the share link. What I want to do is to download that file from the drive using drive API by using the link that I obtained. And...

Send location updates to IntentService


android,intentservice,google-api-client
How can location updates be sent directly to Intent Service? The following approach does not work. OnConnected function is called but then the intent is never received in the service: ... private PendingIntent getLocationPendingIntent(boolean shouldCreate) { Intent broadcast = new Intent(m_context,LocationUpdateService.class); int flags = shouldCreate ? 0 : PendingIntent.FLAG_NO_CREATE; return...

Newbie Google Drive API (PHP) confusion - what guide/library to use?


php,api,google-drive-sdk
I have a mobile site m.example.com - from a phone I want visitors to choose a file from Google Drive, and send it to the server that hosts m.example.com. Essentially emulating a simple <input type="file"> file upload as on a desktop. From what I understand the workflow is as follows:...

Recursive entry to executePendingTransactions on using GoogleApiClient in Fragment


android,android-fragments,google-places-api,google-api-client
I am trying to use Place Autocomplete API in my app. I have a main Activity. I have a Fragment which is a part of MainActivity. In OnViewCreated() on this Fragment. private void rebuildGoogleApiClient() { // When we build the GoogleApiClient we specify where connected and connection failed // callbacks...

access drive with access token


php,google-drive-sdk,google-spreadsheet,google-oauth
struggling to understand the oauth2 token and refresh token processes ive got this code $url = 'https://www.googleapis.com/oauth2/v3/token'; $data = array('client_id' => 'clientid', 'client_secret' => 'secret','refresh_token' => 'token','grant_type' => 'refresh_token'); $options = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded", 'method' => 'POST', 'approval_prompt'=>'force', 'access_type'=>'offline', 'content' => http_build_query($data), ), ); $context...

When should I disconnect GoogleApiClient (Android)


android,google-plus,google-api-client,google-login
In my android app, I have 3 login options. Google+, Facebook, and my own login option. I've implemented all 3. I've implemented Google+ login using the steps outlined here. Server side access is enabled. I get the one time authorization code and pass it to my own api. Once I've...

Any way te read an excel file from a Google Sheet?


excel,google-apps-script,google-drive-sdk,google-spreadsheet,google-apps
in my organization we work with Google Apps but we have one file that we need to maintain in Excel due to its complexity. All my other spreadsheets are Google Sheets and a lot of them need to get data from that excel file. So my question is: is there...

The lightest (most lightweight) Google Drive REST API query/response?


google-drive-sdk,google-drive-android-api
When initializing the REST Google Drive API in an Android app, I need to 'poke' the server to produce the UserRecoverableAuthIOException In order to minimize the network traffic, I'm searching for the most 'lightweight' request that would produce such an exception. Currently, I use the following construct: com.google.api.services.drive.Drive svc; svc.files().get("root").setFields("title").execute();...

User disconnecting app in Drive causes loss of data under FILE scope


google-drive-sdk,google-drive-android-api
I've run into this issue a few times, but could never point my finger on it, attributing it to GDAA's latency, my buggy code, etc... I finally managed to come up with a scenario where I can safely reproduce it, so I would like to ask people who know if...

Google Drive API VB.NET Parent Folder of a Folder


vb.net,google-drive-sdk,folder,parent
I am trying to work with Google Drive API with vb.net I have seen a lot of post but I am not able to understand how to choose the right folder to add a file. I have a lot of "Backup" folder but, I assume now, I want to add...

How can I make a copy of a file in Google Drive via Python?


python,google-drive-sdk,google-oauth
I wrote a short function in Google Apps script that can make a copy of a specific file that is stored on Google Drive. The purpose of it is that this file is a template and every time I want to create a new document for work I make a...

Advanced Drive Services in Addons


google-apps-script,google-drive-sdk
I have a Google Script that uses the Advanced Drive API service and am now looking to convert this script into an Add-on. However the Drive API needs to be enabled manually by the user before using the service inside the Apps Script. Is it possible to use the advanced...

mGoogleApiClient.isConnected() returns null


android,google-play-services,google-api-client
I have gone through all the StackOverflow questions and tried every method but still the problem persists. public class PlaceInfoActivity extends ActionBarActivity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { private static final String LOG_TAG = "PlaceInfoActivity"; private static final int GOOGLE_API_CLIENT_ID = 0; private GoogleApiClient mGoogleApiClient; TextView mTextView; String content = ""; @Override...

Cannot get Google Drive App Data folder content using query anymore


java,android,google-drive-sdk
For some reason the following Android app code com.google.api.services.drive.Drive drive; ... drive.files().list().setQ("mimeType='application/vnd.google-apps.folder' and 'appdata' in parents").execute().getItems(); started returning empty list since May 14. This code was returning my custom folders for more than 1 year before. I can see my App Data content still exists through https://drive.google.com/drive/my-drive > Settings >...

Can one track the usage of a shared resource from google drive


google-drive-sdk
Does anyone here know if you on Google Drive somehow can track if a public shared link to a file have been used? That is, the resource have been downloaded, viewed or otherwise "touched"?...

Can I associate a user's account with an action to the drive API?


javascript,oauth,google-drive-sdk,google-spreadsheet,google-oauth
We're looking to make a little webapp to manage our week-long nerf war (humans vs zombies to be precise), and we're thinking about how easy it would be to have Google Sheets be our only backend, and our frontend be entirely javascript/html/css. Let's say there's two actions that can be...

Google Drive list method doesn't list files created recently


google-drive-sdk
I've developed an extension for Google Chrome that HEAVILY relies on Google Drive API (the extension is LBTimer, available in Google Chrome web store), to store data in the appfolder, using XMLHttpRequests Since May, 13th 2015 I'm finding a problem when using the list method. If I programmatically create a...

How to create a Google form programatically with python ?Is it possible to do so by appscript and python interfacing or something like that?


python,google-drive-sdk
How to create a Google form programatically with python ? Do they provide some api like drive api to do so ? Is it possible to interface python with Google appscript ? https://www.youtube.com/watch?v=38H7WpsTD0M Here they are talking about creating a form with a form using app script . Thank you...

Check if geo location(lat,lon) inside a circular geo fence


android,google-api-client,locationlistener,android-geofence
I have a saved geo location(latitude,longitude).when a user presses a action button in app, the current location is recorded. I want to check if the current latitude,longitude(which I have) falls in a circular geofence (who's center geo point I have ). I don't want to create a geofence on Google...

Failed sending mail through google api with javascript


javascript,email,google-api,google-api-client
I'm trying to send an email through Google API with JavaScript. My issue is that when I try to send a simple mail with no attachments, I get the following error: 'raw' RFC822 payload message string or uploading message via /upload/* URL required` My code function sendMessage() { gapi.client.load('gmail', 'v1',...

Google Drive - How to List all Files in a specified folder


php,google-apps-script,google-api,google-drive-sdk,xampp
Hi I am stuck here with this situation, I have tried a number of different approaches but I cannot get what I am after. Situation: I have a large number of files in folders hosted on google drive. For instance a single client folder for reports has between 2000-10000 files(this...

Google API: object oauth2 is not a member of package com.google.api.services


google-api,playframework-2.0,sbt,google-api-java-client,google-api-client
I'm developing a web backend using the Google APIs. In order to get the email address of a user, you have to send your access token to a Google tokenInfo service, that will return general information (including your email address). In general Google APIs do not return you the mail...

logout from Google+ from other activity


android,google-play,google-api-client
I have recently implemented the Google+ API. I managed to succesfully authenticated and move forward to the main activity. My issue is that I would like to include a "LogOut" option in the action bar menu and when the user comes back he will be prompted to login again. I...

Google Drive PHP Client render PDF?


php,google-drive-sdk,google-api-php-client
I'm trying to render a PDF from a service account (the file is shared with the service). $pdf = $drive->files->get($file_id); $pdf->downloadUrl However, the resource is coming in with 401 Unauthorized. It's funny that I'm authorized to get the files and everything, but downloading the actual files is unauthorized? I want...

Pass Comments & Suggested Edits from a Google Document to a Google Sheet


google-apps-script,google-drive-sdk
Fellow Stackers. I'm using a Google Apps Script to (a) capture all "Comments" in a Google Document... ...and (b) list them in a column of a Google Sheet... However, I'm wondering if it's possible to... (1) Array "Comments" into individual cells down a column in my Sheet rather than into...

Directory sandboxed access for Google Drive / Dropbox API / RemoteStorage apps?


html5,google-drive-sdk,dropbox-api
Is there a way to get sandboxed, user-selected directory access on any major file service without first getting read level access to their entire filesystem? There's a lot of talk about "unhosted" static webapps that allow users to access their data from a 3rd party file service (Google Drive, Dropbox,...

google-apps-script count files in folder


if-statement,google-apps-script,count,google-drive-sdk
I've had a search but cannot seem to find what I am looking for. I am seeking the code to enable me to do this pseudocode: Count number of files in specific Google Drive folder (by folder Id) If file count is above 'x' do this {other piece of code}...

android - service for interaction with wearable


android,android-service,android-wear,google-api-client,android-wear-data-api
I tried creating a service (which extends WearableListenerService) which should send as well as receive data with wearable. But when i created GoogleApiClient object in that service, it failed with NullPointerException. public class MyService extends WearableListenerService{ private GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Wearable.API) .build(); private final String MESSAGE_PATH = "/message";...

Google API client bug, sending locations


android,google-api,google-api-client,android-googleapiclient
I want to create that I send every few seconds a message to GCM. But after some time I want to remove the locationupdates again. For sending the data to the intentservice of gcm I use a pendingintent. Now every time and it happens a lot I get this error...

Google Drive API 500 null errors when copying


google-api,google-drive-sdk,google-api-php-client,google-api-client
I'm getting this error message (100% of the time) when copying a shared file, using the latest version of php library. And I'm getting the same response via the API explorer: developers.google.com/drive/v2/reference/files/copy Google_Exception: Error calling POST https://www.googleapis.com/drive/v2/files/#fileid#/copy: (500) { "error": { "code": 500, "message": null } } This issue seem...

How to browse files from projects google drive


php,google-drive-sdk
i have created project in google console with service type credentials. I have downloaded p12 key file, and then wrote sample code for inserting file to test it: <?php require_once 'google-api-php-client/src/Google_Client.php'; require_once 'google-api-php-client/src/contrib/Google_DriveService.php'; require_once "google-api-php-client/src/contrib/Google_Oauth2Service.php"; $scopes = array('https://www.googleapis.com/auth/drive'); $accountEmail = 'SECRET'; $accountP12FilePath = './key.p12'; $key = file_get_contents($accountP12FilePath);...

Google Service account user interfece


google-api,google-drive-sdk,google-oauth,service-accounts
How can I login to a Google Service account with the normal web user interface, for example to google drive ? Now I can only login using API using script....