Creating OneNote in a specific OneDrive folder - onenote

I'm trying to add some OneNote integration into an app using the API. I'd like to create a OneNote file in a specific subfolder of the user's OneDrive account - is this possible?
POST https://www.onenote.com/api/v1.0/me/notes/notebooks creates the new notebook in /Documents with the name you provide in the request body - but I'd like to put it somewhere specific.

For simplicity, the REST APIs does not allow this type of customization and only creates notebooks under the Documents folder.
Our feedback has found that the vast majority of users do not care about the exact location of the notebook as long as the notebook is easily and quickly discover-able.

Related

What is the internal file format of a .glink file?

I would like to add URL links into a web-based Google Drive folder. Searching online, it appears that this was once possible with files that ended in a .glink extension. I'm looking for documentation on the file format so that I can create them programmatically.
[EDIT] Why do I want to create .glink files? Because I want links (bookmarks, URLs) to be able to appear in my Google Drive web page and to be able to click on them an go to the page. Microsoft OneDrive supports this functionality.
GLINKS Files
The URL link file feature was available due to a workaround with Back Up and Sync before being deprecated with Drive for Desktop. The .glink seems to be patched and no longer available as it was also part of a third party tool no longer available. It seems it now only saves them as .URL and automatically gives it the icon for Google Docs, as it would take it as a simple file with text.
Checking the .url type file of Windows, when uploading to Drive it does not update as it should, even utilizing Drive for Desktop (as an alternative to sync data like back up and sync) the outcome is the one suggested above.
This is the main reason why there is no longer any documentation about the matter, due to this one not being an official feature and being also fully deleted, it can be confirm by the file type available when creating files with the Drive API:
https://developers.google.com/drive/api/guides/ref-export-formats
I would suggest to request a feature to allow this or to provide a new way to store URL links as before or report it to review if possible any references on how it used to work by submitting a feature request or checking the issue tracker about the matter:
https://issuetracker.google.com/issues/new?component=191650&template=824106
You can also add the details of the previous threads or discussions about the GLINKS.

How can I access the files I created in my google project

I have spent a lot of times creating a project in https://console.cloud.google.com, enabling the Drive API, creating server account credentials, and finally writing a small NodeJS integration allowing me to read and write files to Google Drive.
My intent is to be able to store files (organized in folders) on Google Drive from my server, and see them in the classic Google Drive desktop app with my Google account to check everything is fine.
My project seems correctly setup and I was able to create files from my NodeJS program (the files exist, I can list them with the same program), but I can't see the files anywhere in Google Drive with my Google account, with which I created the project.
I was expecting this to be extremely simple. That I would have a out of the box Drive UI allowing me to review the changes.
In the documentation they say I can configure a UI integration but I don't know if this is what I am looking for or not. It seems complicated, talking about my "app" etc, while I just want a simple Google Drive UI for it !
Could anyone help me understand all this ?
Thanks

File name conversion for cloud storages?

Lets say I have a web URL to a file on a cloud storage (like Dropbox, Google Drive, etc). How do I convert that to the corresponding file path on my pc? On Android? On iOS?
Assuming of course I have the utilities/apps installed locally.
EDIT: I interested in file name the reverse direction too. (I.e. when I have the local file path, what is the web path?)
EDIT 2: #Greg just made me realize that the problem with file name is much worse on Google Drive than on Dropbox.
And that is very bad. :-(
The reason? Google has good search capabilities on Drive and therefor I and many, many others have put their documents on Drive. However, once I found it I must locate it on my on computer/device. (If I want to edit a pdf for example.)
EDIT 3: #Dan McGrath kindly asked what parts remain unsolved.
Short answer: All. ;-)
Long answer: My actual use case, see below.
My actual use case is a Zotero web app. Zotero is a reference database where you store references to scientific articles, web pages, etc. The items stored in Zotero may include PDF files or - which I prefer - links to PDF files.
I just want to be able to easy access (read) this PDF files from any computer through the web app. And on my own computer I want to be able to edit the files with my local PDF editor. (Be it Android, Windows or whatever.)
By using a cloud storage I do not have to download/upload the files myself. The cloud storage takes care of that part.
For the "reverse" scenario, that is, you have a file and you want the Dropbox shared link, you can use this API endpoint, assuming you're connected to the account via the API:
https://www.dropbox.com/developers/core/docs#shares

Generate a URL for Google Drive publicly shared files and access them

I have a collection of PDF files on a Google Drive. I have shared them and I want to be able to link to them from a list on a web site. What I'd like to be able to do is work out the file name of the PDF using information in the list. As a simple example, if my list contains items 1, 2 and 3 I'd like to be able to upload PDF files 1.PDF 2.PDF and 3.PDF to Google Drive then have the web site just link to those when a link is clicked and show the PDF files in the browser.
So, I guess I could do this just by uploading the PDF to Google Drive and manually adding a link to PDF on the web site. However, what I want to do is generate the link programmatically so that when I have, say, 50 PDF files I don't have to keep getting the link from Google Drive and adding it to the web site. The site should just work out that item 50, say, in the list will link to 50.PDF, for example.
I've tried to get the file id using the API but that requires the authorization token to be generated and manual intervention to take place, so that won't work. At least, not at the point where the file is viewed because the viewer is anonymous.
So my questions are:
Is it possible to work out what a file name will be on the drive using just something like an item number in a list?
I guess that there are maybe some other options - for example, when I add the items to the list on the web site programmatically, I could go and locate the google drive file manually using a web application and link it using the file id at that point. I could store the ID in a database - however, would any anonymous user then be able to just click on the file link on the web site and view the file?
Finally, can anyone think of another way to do this?
Any help would be appreciated! :)
Is it possible for you to use a service account? You can authorize the app with an account dedicated to your app and user doesn't need to authorize and authenticate. The files you will be uploading will be managed under the service account's Drive.
You can learn more about service accounts on https://developers.google.com/accounts/docs/OAuth2ServiceAccount
If you have implementation specific questions, please ask.

Copy a file from Google Drive to my own server

If you remember, I'm trying to integrate Google Drive within our website, which is built on Elgg. Elgg already has its native file management system.
What we would like to do is to copy a file from Drive to our server, you know, kind of : Send to My Files. The problem is that I don't see any URL in the file metadata indicating where the file is physically stored.
I can see the copy function in Google Drive SDK but I don't think it allows to copy the file on our own server. Unless I've read it wrong.
Can you help me?
Thanks you.
If you are trying to save a file that has content stored in drive (e.g an image, pdf, etc.), the file's metadata should contain a downloadUrl that can be used to retrieve the file's content through an authorized GET request.
For Google Documents (Google Docs, Google Spreadsheets, etc.), the data is stored in a private format that cannot be understand by third party applications. In this case, your app will have to use one of the exposed exportLinks to export the document into a format understood by your application.