I’m currently trying to get OAuth access tokens via curl. My curl request is as follow:
curl -X POST \
-H "Content-Type: application/x-www-form-urlencoded;charset=utf-8" \
https://api.hubapi.com/oauth/v1/token \
-d grant_type=authorization_code\
&client_id=<my_client_id>\
&client_secret=<my_client_secret>\
&redirect_uri=https://www.example.com/\
&code=<code>
The actual redirect_uri doesn’t seem to matter, no matter what I use, I get this error:
{
"status": "BAD_REDIRECT_URI",
"message": "missing or unknown redirect URI",
"correlationId": "a21020ee-fef2-44a4-a990-ad6c5e5f331c",
"requestId": "e81f1973945f58f665852606c88cd292"
}
I have tried encoding the redirect_uri as a URI component and wrapping it in quotes. I keep getting the same error.
Thank you!