

You can do this by selecting the second upload query from the “On Success” dropdown. For the final touch, you will need to return back to the first metadata upload query and set this second upload query to be run on success.

To finish this query off, since we will want to refresh our updated list of files after this new file upload, by running our ‘pullFile’ query ‘On Success’, in the event handlers below. For information on how to create a metadata-only File, refer to Create files.

$conn = new mysqli($this->dbHost, $this->dbUsername, $this->dbPassword, $this->dbName) ĭie("Failed to connect with MySQL: ". The Drive API allows you to upload file data when you create or update a File. You will get client ID and client secret in the pop-up. In my case I passed the URL I’ll create this file in a later part. In the Authorized redirect URIs add the link of the redirect URL. Under Authorized JavaScript origins enter your domain URL. Choose the radio button for Web Application. Select Oauth Client id under Create credentials.

To interact with the Drive API, you require to send the access token in each request. Assuming you are asking about creating a Google API key: API keys are used to authenticate requests to Google APIs. I am going to cover the following topics. In this article, I show you how to integrate Google Drive API with PHP. As I did some work with Drive API, I thought it’s better to write an article on it. We wanted to perform create and upload operations on Google Drive from our application. Recently, I worked on a project where we’re dealing with the Google Drive API.
