I am trying to get the access token and refresh token for my test app but I am getting - “‘MISMATCH_REDIRECT_URI_AUTH_CODE’ - redirect URI does not match initial auth code URI”.
The code is looking fine just header is not correct according to me, so please use headers = {‘Content-Type: application/x-www-form-urlencoded;charset=utf-8’}
You have to add your landing page “redirect url”, where you want to get response of app authorization.
Example of App Redirect URL in screen shot : Screenshot by Lightshot
Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards.