Obtain Authentication Code



Hi, I'm new at integrations on hubspot, I'm trying to get access and refresh token with the post restFul service, "https://api.hubapi.com/oauth/v1/token" but I receive the following message "BAD_AUTH_CODE", the problem is that I don't know where to get the autenthication code or what I need to put in here "redirect_uri=https://www.example.com/&code=2a45571d-3242-48ed-bd13-58c66e446e09"

Can you help me?



Hi @josanzrdz, did you walk through each of these steps listed here in order? This issue usually occurs when the redirectUrl you’re including in the request to get access/refresh tokens doesn’t match up with the one you include when initiating the OAuth connection. The following article has some more details here: https://developers.hubspot.com/docs/methods/oauth2/initiate-oauth-integration