My sales team is using a HS CRM and all the users are stored in there. Now I want to implement a webhook to be called when any user's property changes. I have created a developer account and subscribed to the events and setup a webhook as well. Now I need to install a developer account app in my HubSpot CRM account for which I need to go with oAuth2.0. I have got the code as per the HS documentation using the redirect URL. Now I am trying to obtain access token so that app can be installed in CRM and able to make webhook calls.
As mentioned in this Doc, I am trying to make an API call with the below curl.
curl --location 'https://api.hubapi.com/oauth/v1/token' \
--form 'grant_type="authorization_code"' \
--form 'client_id="id"' \
--form 'client_secret="secret"' \
--form 'redirect_uri="url"' \
--form 'code="code"'
I am getting 415 - Unsupported Media Type error. please someone help me I am using developer account's app's client id and secret.