Upload file in a specified google drive with google drive api - google-drive-api

I am using Google Drive REST API. Using this app I can upload the file to Google Drive. But I faced some technical problem.
Is it possible to upload files to a specified Google Drive?
Is it possible to fix the access code of Google Drive?

Yes it's possible.
It is the access token that tells Drive which account it should operate on. So read and understand OAuth and you're good to go.

Related

Salesforce to Google drive file transfer

I am trying to download all the attachments from salesforce to upload them in google drive and leave a google drive link in salesforce against each object to access the file from google drive. Is there a process or tool that I can use to implement in this?
I have tried connecting to salesforce API to access the files but I looking for ideal solution to perform this.

Why can't i transfer ownership of google drive folder and files to other? (OwnershipTransfer libary is being used)

The library I am using is from here.
The response has very little info to debug or I don't understand what is this. It supposed to be easy from what I read in the description.
Any help?
That's an intended behavior. From your screenshot, I'm assuming you're using a G Suite/Workspace account for your 5times.co.in email. Please take note that transferring files from one Workspace account to another workspace account or Gmail is not possible as of the moment.
This is a documented here: https://support.google.com/a/users/answer/9308960
You can transfer ownership of your Google Drive files and folders to someone else in your organization.
an alternative is to either use Shared Drive or download the file and re-upload it to your Gmail account.
A better way to do this is:
step-1: Transfer files from the drive (your Gdrive) to google cloud storage
step-2: Transfer files from google cloud storage to drive (new Gdrive, different organization)
Reference python code for file transfer between DRIVE & Google drive.
https://colab.research.google.com/drive/1Xc8E8mKC4MBvQ6Sw6akd_X5Z1cmHSNca

Which Google API is Dropbox using to edit docs inside its own application?

I've been doing some research to find out which API dropbox is using to edit docs, sheets, and slides using google doc editors inside its own application. I've looked at Google Docs API, Google Drive API, and Google App Scripts I still don't have a clear answer.
From the looks of it files are uploaded to Dropbox, then can be opened in Google's editors and they are saved back to dropbox after editing. These files don't show in my google drive so I am assuming they are not being saved by Google.
These API are correct. It's your assumption that is wrongful. Dropbox may act as a Drive application and these files are outside of your reach, nevertheless still within your Drive.
Here it's explained: store application-specific data.

Limiting Google App Script permission to only access files it creates

Is it possible give a Google App Script permission to create files in a user's Google Drive, and then only have edit/delete access to those files, without having write access to any other files?
From what I can understand, the permission I need for this is drive.file under dependencies.enabledAdvancedServices[].serviceId, which is available in Google Drive API v3, but Google App Scripts only supports v2 (at least, as far as I can tell in the "Advanced Google Services" dialog).
Is there a way to get drive.file in GAS that I'm missing? Or has Google announced any plans to bring v3 into GAS? Or another way to restrict my script to only having write access on files it creates?

Search file in other google drives

I have a google drive where am storing few google sheets. My java web application is able to search a file that is present in my own google drive using Javascript API. Is there a way to search for a specific files in other's google drive via code? i will be getting the shareable link to the google drive am supposed to search. can this be done? As far as i checked this is not possible. Also there is no where in google document that says i can search files in other's drive. Kindly someone confirm.
This is an OAuth question, not a GDrive question.
The account that the GDrive API will apply to is determined by the Access Token that it is called with. So, if you can get an Access Token for somebody else's Drive, then you can use that to search their drive. How you would get such a token will depend very much on the details of your use case and the trust relationship.