Open Solovic2 opened 4 years ago
Hi dear Go to your Google Developers Console > Then go to API Manager > Click on the Credentials > Go to your Web Client Service. You'll see clientid and client secret. Below there somewhere you'll find Authorized redirect URI. Just add your redirect uri for eg. `www.example.com/oauth'. Now google will use one of the listed redirect uri. It will fix your problem.
It is not package's problem. Try to search problem solving on the stackoverflow.
thanks sir for replying , i'm beginner with laravel so please care of me , i did what u wrote , but same problem with me , it send with my url in request { code & scope &state } after i sign in , but when use callback function which upload video , it says same thing which i put above .
my try is :
making clientId ,client secret .
save , and put it in my env file .
make Authorized redirect URI >> http://localhost/proj/public/myown .
run composer require arm092/laravel-youtuber .
in my view i put
Route::get('youtube/auth', 'YoutubeUploaderController@auth');
Route::get('youtube/callback',
'YoutubeUploaderController@callback'); `in my controler ( YoutubeUploaderController ) i make methods.
in my web site , i run
http://localhost/proj/public/youtube/auth
and signing in ,it redirect tohttp://localhost/proj/public/myown/...
with request ( code=.. & scope=.. & state=.. ) , but , it show me same problem i tried to make another route and view with form to submit from that linkhttp://localhost/proj/public/myown/...
, it says i should be authorized .
so what i should to do ?
I hope i didn't disturb you , thanks sir.
hello sir , when i use first step when i call youtube/auth , after signing in , it redirect back and show me this error
the error is : " GuzzleHttp\Exception\ClientException Client error:
POST https://oauth2.googleapis.com/token
resulted in a400 Bad Request
response: { "error": "redirect_uri_mismatch", "error_description": "Bad Request" } " .i put the second route with method ( callback ) and the error i think from third line
public function callback(Request $request){
> $youtube = Youtube::setRedirectUrl($redirect_url)->upload($video,[]);`
what should i do ?
thanks sir .