Skip to main content

Configuration for PyDrive in Google Drive Before Run Authentication Script


- Go to "console.developers.google.com"

- Then Go to "console.developers.google.com/iam-admin/projects"

- Create your own Project

- Go to "Service Accounts" menu and Enable "API" to On

- Go to "API Manager" menu and then Go to "Credentials"

- Clicked on "Create Credentials" and Clicked on "OAuth Client ID"

- Give Some "Project Name" in "OAuth Consent Screen" page and saved it

- Select "Application Type" to be Web Application

- Enter "http://localhost:8080" in "Authorized Java Scripts"

- Enter " http://localhost:8080/ " in "Authorized redirect URIs" and save it

- Download JSON file and Rename to "client_secrets.json" and Put this file in working directory


Problem Faced By Mine :

- Json file name with client_id. So it throws some error
Solution : Should rename to "client_secrets.json"

- Entered like "http://localhost:8080" in "Authorized redirects URIs" field. So I got authentication failed issue in webbrowser while running script.
Solution : Should entered like this "http://localhost:8080/"

Comments

Popular posts from this blog

Install and Configure Apache in Ubuntu 14.04

Easy way to install and configure "Apache" server in Ubuntu 14.04 1.Install apache:              sudo apt-get install apache2 2. In /etc/apache2/sites-available/000-default.conf :                 ScriptAlias /cgi-bin/ /var/cgi-bin/                <Directory "/var/cgi-bin">                         AllowOverride None                         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch                     ...

Linux Terminal Command

I will leave here some important basic linux terminal command that might be helpful during program installation and uninstallation process in Ubuntu. When you want to know the available version of package name then execute following command apt-cache policy packagename When you want to install the specific version of package name then execute the following command apt install packagename=version When you want to pin the package name not get to update in future then do the following In the following directory, /etc/apt/preferences.d/  Add the following content in the existing file, package : program name pin : version x.x.x* pin-priority : 1000  Note : pin-priority - This will prevent the program from the up-gradation. When you want to know the recently installed package name then execute the following command find /var/lib/dpkg/info/ -name \*.list -mtime -3 | sed 's#.list$##;s#.*/##' This will show the list package name which has ins...

PHP Session Clean

I was getting the following error when trying to browse the icingaweb2 website in the browser Fatal error: Uncaught ErrorException: Uncaught ErrorException: session_name(): Cannot change session name when session is active in /usr/share/php/Icinga/Web/Session/PhpSession.php:97 Stack trace: #0 [internal function]: Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}(2, 'session_name():...', '/usr/share/php/...', 97, Array) #1 /usr/share/php/Icinga/Web/Session/PhpSession.php(97): session_name('Icingaweb2') #2 /usr/share/php/Icinga/Web/Session/PhpSession.php(152): Icinga\Web\Session\PhpSession->open() #3 /usr/share/php/Icinga/Web/Controller/ActionController.php(540): Icinga\Web\Session\PhpSession->write() #4 /usr/share/php/Icinga/Web/Controller/ActionController.php(490): Icinga\Web\Controller\ActionController->shutdownSession() #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(512): Icinga\Web\Controller\ActionCont...