
Please let me know if anyone needs the complete code. Hope this saves someone's time.as it took me a long time to reach here. This will give you Redirect Uri's which don't need to be updated. You need to create a client ID in google developer console for installed applications. String arrBytes = PATH_TO_SAVE_FILE" + fileNameToSave, arrBytes) ĥ. If (!String.IsNullOrEmpty(_fileResourceDownloadUrl) )ĭriveService _service = AuthenticateOauth(CLIENT_ID, CLIENT_SECRET, MY_EMAIL_ADD) String MY_EMAIL_ADD = " EMAIL_FROM_DEVELOPER_CONSOLE" Connect with Oauth2 Ask user for permission string CLIENT_ID = " CLIENT_ID" Public ActionResult downloadFile( string _fileResourceDownloadUrl, string fileNameToSave) Following is the method to downloadFile to application server , new FileDataStore( " FOLDER_NAME_TO_STORE_AUTHENTICATION_TOKEN_ON_SERVER")).Result ĭriveService service = new DriveService( new BaseClientService.Initializer()ĪpplicationName = " APPL_NAME_AS_PER_API_CONSOLE",Ĥ. Span1.Public static DriveService AuthenticateOauth( string clientId, string clientSecret, string userName) Span1.InnerHtml = "File uploaded successfully to the server as " & _ I want to create a script in google script that will upload the file to the site. I want to send from the Python file without a JSON file and without requesting a google account. Step 4 : Enter your Google Email Id in the Email Field. Step 2 : Now Go to Step 3 : Now, You have to click on the Go to Google Drive button. If Not (File1.PostedFile Is Nothing) Thenį((" \\\" & Text1.Value)) I don't want to do this with API because it's with JSON file and requesting a password to google account. Step 1 : First of all Open your Web Browser on your computer or laptop. Span1.InnerHtml = "Error: you must enter a file name"

Private Sub btnUpload_ServerClick(ByVa l sender As System.Object, ByVal e As System.EventArgs) Handles btnUpload.ServerClick I am not quite sure how to add a Username/Password to my code below. What I am trying to do is upload a file from the local computer onto a network share drive.
