The redirect_uri does not match the client registered redirect_uri - what is it?

Hi @andrew_salman ,

The redirect URI you specify when initiating the Oauth connection must exactly match the redirect URI you included in the request to get access/refresh tokens. Using the example from the docs, if you initiate the connection with this URL:

https://app.hubspot.com/oauth/authorize?client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&scope=contacts%20automation&redirect_uri=https://www.example.com/

You have to include the exact redirect URI in your request to get access/refresh tokens:

https://api.hubapi.com/oauth/v1/token Headers: Content-Type: application/x-www-form-urlencoded;charset=utf-8 Data: grant_type=authorization_code&client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&client_secret=yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy&**redirect_uri=https://www.example.com/**`&code=zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz`

If you’ve done that and you’re still seeing the error, make sure to check if you have a trailing / at the end, this can cause problems. If you continue to see the error, can you send me the URL you’re using to initiate the connection, as well as the full request you’re sending to get access/refresh tokens (sans code/client secret/etc.)?