There are 2 main reasons why this 4700 error happens:
You have not added the redirect URL to hwitelist
The redirect URL in your app does not match with the redirect URL that you are using when making the request call to the access token.
Can you please confirm that this is not the case?