Why is Minitube not working anymore?

When I run minitube from terminal I get:

No available API keys 
403 "Error downloading https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&maxResults=50&q=teste - server replied: Forbidden" 202

Is there a way to fix this?


Since version 2.4 of Minitube you need to have a personal Youtube API key :

Minitube 2.4
A note for Linux packagers :

YouTube API version 3 requires an API key. Each key has a limited “quota”. In order to build you need your own API key. - Via flavio.tordini.org


First of all you will need to get your Youtube API key. Then you have three options to chose from to make MiniTube works again properly :

  1. Use install script by Noobslab
  2. Modify current install and enter API key there
  3. Compile MiniTube yourself

Get Youtube API Key

Connect to your Google Developer Console and create a new project.

In your project page open Enable Google APIs for use in your apps, and go to :

  1. API and Auth > Youtube Data API and select Activate API.
  2. Go back in API and Auth > Credentials > Add credentials > API Key > Browser Key.

From what I have tried you will need a Google Account but no payment is required.


Method 1 : Use Minitube.sh install script (easiest way)

Noobslab created a installation script which does everything for you.

During the installation, you will be prompted to put your API key :

wget -O minitube.sh http://drive.noobslab.com/data/apps/minitube/minitube.sh
chmod +x minitube.sh
source ./minitube.sh

Method 2 : Use current Minitube Install

If you already have Minitube installed you can simply add your personal API Key :

sudo nano /etc/profile.d/minitube.sh

Add the following line :

export GOOGLE_API_KEY="your-google-api-key"

Note: If you have a qtsingleapp-minitube-xxx.lockfile in your /tmp folder you will need to delete it.


Method 3 : Compile MiniTube

Once you have your personal key you can to compile Minitube.

  1. Install the needed libraries to build:

    sudo apt-get install build-essential qt4-dev-tools libphonon-dev libqt4-sql-sqlite
    
  2. Clone Minitube repository :

    git clone https://github.com/flaviotordini/minitube.git
    
  3. Compile

    qmake "DEFINES += APP_GOOGLE_API_KEY=YouAPIKeyHere"  
    make
    
  4. Launch your compiled Minitube...

    build/target/minitube
    
  5. ...or install it

    sudo make install
    

Refer to the Minitube repository for more information on how to build Minitube with a personal API Key.


Ubuntu 16.04 uses Gnome Software Centre by default, we have found this to where the problem originates:

Here is how we solved it.

Step 1: Visit the website http://flavio.tordini.org/minitube and download the latest .deb file.

Step 2: Click on the Dash Button, Type "Ubuntu Software", Click on the Ubuntu Software Icon. When Ubuntu Software Centre opens, search for "gdebi" and using Ubuntu's Software Centre install the gdebi package installer.

Step 3: Go to your Download folder and Right click on the .deb file and select open with gdebi package installer and proceed with the installation.

Step 4: Check your version number by going to "Help" -> "About"

Step 5: Happy viewing

We think that the reason it doesn't come with a default API key and works out of the box is due to how it was originally packaged for the Ubuntu Software Centre. Additionally if you install the .deb package using the Ubuntu Software Centre (backend Gnome Software Centre) it will automatically default to the version that doesn't have an api key. This is why you need to use gdebi package installer for this to work.