You can't Redirect URI is just the location of the page to return the Authentication to, the one that can handle the call. It must be a static page, path.
It clearly states in the Google Developer Console
One URI per line. Needs to have a protocol, no URL fragments, and no
relative paths. Can't be a non-private IP Address.
Valid Redirect URIs
http://localhost/authorize/
http://localhost/google-api-php-client-samples/PlusLogin/index.php
http://test.daimto.com/Oauth2.php
http://WWW.daimto.com/Oauth2.php
Oauth2 Example:
https://accounts.google.com/o/oauth2/auth?client_id={clientid}.apps.googleusercontent.com&redirect_uri=http://localhost/google-api-php-client-samples/Analytics/Oauth2.php &scope=https://www.googleapis.com/auth/analytics.readonly&response_type=code