title: Google OAUTH: The redirect URI in the request did not match a registered redirect URI
body: <p>I am trying to make an upload to YouTube from my Java based web app, I spent a few days to understand what and where is the problem and I cannot get it, for now I am pulling my hair out off my head.</p>
  
  <p>I registered my web app in Google Console, so I got a pair of Client ID and Secret and a possibility to download JSON type file with my config.</p>
  
  <p>So here is the config:</p>
  
  <pre><code>{
      "web":{
          "auth_uri":"https://accounts.google.com/o/oauth2/auth",
          "client_secret":"***",
          "token_uri":"https://accounts.google.com/o/oauth2/token",
          "client_email":"***",
          "redirect_uris":["http://localhost:8080/WEBAPP/youtube-callback.html","http://www.WEBAPP.md/youtube-callback.html"],
          "client_x509_cert_url":"***",
          "client_id":"***",
          "auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs",
          "javascript_origins":["http://www.WEBAPP.md/"]
      }
  }
  </code></pre>
  
  <p>How is possible that I am getting the default URL from Google?</p>
  
  <p><code>The redirect URI in the request: http://localhost:8080/Callback did not match a registered redirect URI</code></p>
  
  <p>It always gives me the default <code>http://localhost:8080/Callback</code> URL instead of mine.</p>
  
  <p>And IDE console shows me that:</p>
  
  <p><code>Please open the following address in your browser:
    https://accounts.google.com/o/oauth2/auth?client_id=***&amp;redirect_uri=http://localhost:8080/Callback&amp;response_type=code&amp;scope=https://www.googleapis.com/auth/youtube.upload
  Attempting to open that address in the default browser now...</code></p>
  
  <p>I am using the last version of dependencies:
  <em>google-api-services-youtube v3-rev99-1.17.0-rc</em> and <em>google-api-services-youtubeAnalytics v1-rev35-1.17.0-rc</em></p>