I am implementing functionality for uploading video's to a YouTube channel from here.
I set up my Google Developer console environment exactly like suggested.
I also use the same client Id and client secret that it gave me. When I run the script it returns with an error.
- That’s an error. Error: redirect_uri_mismatch Application: Localhost You can email the developer of this application at: XXXXX@gmail.com The redirect URI in the request: http://localhost/youtube/index.php did not match a registered redirect URI.
Request Details
scope=https://www.googleapis.com/auth/youtube
response_type=code
access_type=online
redirect_uri=http://localhost/youtube/index.php
pageId=none
approval_prompt=auto
state=2067416475
client_id=xxxxxx68kc7csrag9as2o3lv70k0spa6hfb1ofs4.apps.googleusercontent
I don't understand the problem.
Redirect URI in the Google developers console states
You have set yours to
you should set it to
Redirect URI must be set to the path to the exact file which will handle the authentication.
Note: Also you will now want to delete that one because you need to keep your client id and client secret private you just shared it with everyone.