title: GoogleOAuth redirect URL, LocalServerReceiver port number
body: <p>I have a java based web app which downloads youtube comments for a given video. It works all fine locally but when i deploy it to amazon clound stated giving me all the erros in the authentication process due to callback url issues.</p>
  
  <pre><code>    GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(
              HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, scopes).setCredentialDataStore(datastore)
              .build();
  
      // Build the local server and bind it to port xxxxx
      LocalServerReceiver localReceiver = new LocalServerReceiver.Builder().setPort( 15555 ).build(); 
      // Authorize.
      Credential credential = new AuthorizationCodeInstalledApp(flow, localReceiver).authorize("user");
     );
      return credential;
  </code></pre>
  
  <p>Above   code snippet was taken from the youtube dev website. </p>
  
  <p>My question is since the <code>localReciver</code> which gets the access token from the youtube, runs on port 15555, there's no way<code>localReceiver</code> is gonna get the response from youtube as only port 80 acessible from outside given my site is on amazon cloud..right?</p>
  
  <p>So in other words if i had my redirect_uri as <code>redirect_uri=http://mysite.elasticbeanstalk.com:15555/Callback&amp;response_type=code&amp;scope=https://www.googleapis.com/auth/youtube.force-ssl
  </code>, is not going to work since it's on port 15555. I'm trying to wrap my head over this to find a solutin. How do you do this? </p>