Hi,
I attempted to write data into the Goals object using a curl command with a PAT that has all scopes enabled.
curl --request POST \
--url https://api.hubapi.com/crm/v3/objects/goal_targets/batch/create \
--header ‘content-type: application/json’ \
--header ‘Authorization: Bearer <pat-na1-..>’ \
--data ‘{
“inputs”: [
{
“associations”: [
{
“types”: [
{
“associationCategory”: “HUBSPOT_DEFINED”,
“associationTypeId”: 0
}
],
“to”: {
“id”: “cliff”
}
}
],
“properties”: {
“hs_goal_name”: “Revenue Goal - 2024”,
“hs_end_datetime”: “1675700596”,
“hs_target_amount”: “1000”,
“hs_start_datetime”: “1675700596”,
“hs_created_by_user_id”: “5”
}
}
]
}’
Issue :
I still getting the “missing scope” issue, The API response is as follows.
{
“status”: “error”,
“message”: “The scope needed for this API call isn’t available for public use. If you have questions, contact support or post in our developer forum.”,
“correlationId”: “ad3010cf-baa3-4007-a0c3-e77c33719812”,
“links”: {
“support”: “https://help.hubspot.com/”,
“forum”: “https://community.hubspot.com/t5/APIs-Integrations/bd-p/integrations”
},
“category”: “MISSING_SCOPES”
}