Not able to get Access Token and redirect_uri mismatch issue
Hi,
First of all thanks for the Dropbox PHP library.
I have successfully integrated this library and able to login into dropbox. I am able to get state and code in return response.
After getting return response, it gives me below error.
-> {"error_description": "redirect_uri mismatch", "error": "invalid_grant"}
NOTE:- Redirect URL is added under developer section and it is correct but still it gives me an error.
For Example :- Under developer section, I have URL like https://xyz.com/redirect_url.php and in return I am getting https://xyz.com/redirect_url.php?state=""&code="" but still gives me an error and don't know why?
After that I have go through the core library and do some trick and hard coded the redirect url and i.e only https://xyz.com/redirect_url.php without params. it works and proceed further but at the end I am not able to get access token.
- Hard Coded the $url inside send function.
File Name :- DropboxGuzzleHttpClient.php Function Name :- send($url, $method, $body, $headers = [], $options = []) {}
- Check access token inside getAccessToken function.
File Name :- DropboxAuthHelper.php Function Name :- getAccessToken
$accessToken = $this->getOAuth2Client()->getAccessToken($code, $state, $redirectUri);
I am getting empty in $accessToken.
Please help ASAP and let me know what approach I follow to make it work.
Thanks