BadRequest - {“status”:“MISMATCH_REDIRECT_URI_AUTH_CODE”,“message”:“redirect URI does not match initial auth code URI”,“correlationId”:“38f1c394-81ae-4bc2-acde-56783785194e”,“requestId”:“07dd0b8b6207650f64418f5ceb4a60b5”}
ss - redirectUri at the time of receipt of the authorization code
redirectUri - redirectUri at the time of receipt of the access_token
From my knowledge if you are using the OAuth and you specify the redirect url in your first request in the browser during the integration of your application you need to provide a page, lets say that this is page A.
In your request to Hubspot you need to point to the same website, that you have specified in the initial request (page A). If you send in the initial request the redirect_url a “localhost”, then if won’t be different on both HubSpot system and your System as it would point to local machine address. (unless it won’t return information that this is not a valid url).
Please try to use both requests (initialization) and your access token request with https://hubspot.com and see if that works.