APIs & Integrations

WDeneys
Member

Provisioning - DELETE not working

SOLVE

I'm able to retrive information without incident, but DELETE is failing. It seems like a simple enough call 🙂

 

The terminated user from the GET /users call:

<snip>

{
"id": "11004878",
"email": "redacted@redacted.com",
"primaryTeamId": "6078721"
}

</snip>

 

I then try calling

DELETE https://api.hubapi.com/settings/v3/users/11004878?idProperty=USER_ID

(I tried not providing idProperty initially) and it fails with

"status_code": 415,
"response": "",
"message": "API error"

 

which is not helpful. I have the following scopes in my oAuth 'private app' (that was nice to setup by the way very simple kudos to whoever did that)

settings.users.teams.write

settings.users.teams.read

settings.users.read

settings.users.write

 

Full headers in case the ray id or some other parameter helps:

"headers": {
"date": "Mon, 17 Jan 2022 22:02:43 GMT",
"transfer-encoding": "chunked",
"connection": "close",
"cf-ray": "6cf2de92b8af255c-SJC",
"strict-transport-security": "max-age=31536000; includeSubDomains; preload",
"cf-cache-status": "DYNAMIC",
"access-control-allow-credentials": "false",
"expect-ct": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"",
"x-hubspot-correlation-id": "44a7b73f-1729-48e6-9f5c-d72eb89a6b1e",
"report-to": "{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=VosvA%2Boj5zkMBnEkERKiOxTaVxkTXzY3sOOKPj1Ogd4JYced2zf5ukfnMRFNWaLlYbuQeX3oVvsXXRIzrIKprV3Ryr3xUeNuFB9B9PXP8QtzDHTUxxtHoJd5wVFVysIr\"}],\"group\":\"cf-nel\",\"max_age\":604800}",
"nel": "{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}",
"server": "cloudflare",
"alt-svc": "h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"
}

 

I need to be able to update profile data other than the role and team which does not exist yet by the look of it - any idea if that is a matter of time or do I need to submit requests or something aka nobody is working on it yet?

0 Upvotes
1 Accepted solution
WDeneys
Solution
Member

Provisioning - DELETE not working

SOLVE

Updating in case this helps others: The DELETE worked when I passed an empty body. Weird.

 

Second - to change a role, you also need settings.billing.write so if you are doing provisioning you will need to add that from the get-go.

View solution in original post

2 Replies 2
WDeneys
Solution
Member

Provisioning - DELETE not working

SOLVE

Updating in case this helps others: The DELETE worked when I passed an empty body. Weird.

 

Second - to change a role, you also need settings.billing.write so if you are doing provisioning you will need to add that from the get-go.

WDeneys
Member

Provisioning - DELETE not working

SOLVE

Edit - forgot to mention - I also tried using the email address in the path and setting idProperty=EMAIL with the same result. Help!

0 Upvotes