Unless a user open's his onedrive account on a browser, the REST API for drive is returning 404 "User's mysite not found."
How can I enable drive access using the API?
Related
I have a process to upload Offline Stores Sales in AdWords API.
Now I developed a new process to upload via Google Ads
I have a problem:
StatusCode: "PermissionDenied
Detail: Google Ads API has not been used in project XXXXX before or it is disabled.
From migration documentation:
You can use the same developer token that you used with the AdWords API, and whatever level of access you had for the AdWords API will carry over to the Google Ads API.
So it should be the same permissions. I have developer token , that works good in AdWords .
The problem is, that I didn’t create any project in Google Cloud…
Maybe the developer, who started developing uploading Offline Stores Sales in AdWords API , created it. This developer is no longer in the company, so I can’t ask him provide me the permission…
How I can get permission to this project ?
I am trying to build a static web page using pure HTML CSS and JavaScript with the ability to download a file from OneDrive.
On button click event, a JavaScript function should access OneDrive and download Excel file for display on the browser without any user interactions or authentication.
As you know, making an AJAX call to the direct download link of the OneDrive file that looks something like this: "https://onedrive.live.com/download?cid=32...&resid=32...&authkey=AD..." throws Access to download link has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. I tried Using the OneDrive API in JavaScript apps (CORS support) example but that did not work.
I came across HOW TO — Get an Access Token for Microsoft Graph API using Node.JS. I followed the example and I was able to get the Access Token for authentication but this was only possible using Node.JS. I have searched the internet and almost all the example codes online use Node.JS to authenticate Microsoft Graph API.
https://github.com/microsoftgraph/msgraph-sdk-javascript/tree/dev/samples/browser
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-browser-samples/VanillaJSTestApp2.0
While others required user interaction for authentication which is not what I want.
See: https://gist.github.com/psignoret/50e88652ae5cb6cc157c09857e3ba87f
My question is, using vanilla JavaScript (Not Node.JS), how can I
Log in to Microsoft Work, Office, or Personal Account.
Get the Access Token
Use the token and call Microsoft Graph to download a file from OneDrive
Without any user interaction/authentication?
I already did the google sign-in with the plugin vue-google-auth (more info in: https://github.com/simmatrix/vue-google-auth) returning one object called GoogleUserS.
Now i want to store in that google account's drive some config files of the website.
How can i do that?
Edit: some user sign in in my site and choose some channels it creates a file called channels.txt and i want to store that in user's google drive account (assuming that user has a google account and already sign in with that google account in my site)
Is there a way to download files from a specific google drive, by using the google drive api? Currently i can only read the drive of the google user logged in.
Inorder to access data owned by someone on Google drive you need their permission. You can't just access my files unless I let you. The most common method for this is oauth2 but you can also use a service account.
Now if I set a file to public you would be able to read it using an API key but I would have to give you the file id.
I want to create a web app letting any user upload a file to my Google drive and then be able to view it through the browser.
So far looking at Google's examples it seems I have to auth to my Google Drive on the server side (makes sense....) but also end-users have to auth before uploading anything to my drive using Oauth. Is there a way to prevent having to ask users to authenticate prior to uploading documents given that I am authorized through my server to my Google Drive account?
Allowing anyone to view a document is more straightforward through the use of a public folder...