You do not need to go through the trouble of using this app if you add https://www.googleapis.com/auth/drive.install scope (see this StackOverflow question )

This page helps provide a Drive file permission to a Google Cloud Project. For more information on how to use and setup, see project README.
Everything here happens at your browser, no data is sent to any server except Google's. All the info is stored in your browser's localStorage for convenience.

Project Info

Drive UI Integrate Simulation

Open With integration

Open your app URL with a request to Handle an Open URL. You need to pick a file from Drive to grant access permission.

Create integration

Open your app URL with a request to Handle a New URL. You need to pick a folder from Drive to grant access permission.