Oct 30, 2022 9:36 PM
I've recently switched from the API key auth to Private Apps, and I can see that all things are working correctly in terms of the CRUD updates. However after the initial create, I call subsequent updates to this new object, but start getting 404's for it not being there.
Below is the contact and deal creation.
Then within the same minute, It starts 404ing
This behaviour does not occur when using the API key, so was wondering if this is some sort of underlying behaviour of private apps.
I had been using this guide to transition from the api key to the private apps.
https://developers.hubspot.com/docs/api/migrate-an-api-key-integration-to-a-private-app
Solved! Go to Solution.
Nov 22, 2022 1:33 AM
So just to update this post.
In the end It was related to our own webhook hubspot application we had implemented feeding back into our server, which aimed to stop hubspot deals/contacts being created and then we deleted them. So entirely our fault 🙂
Nov 22, 2022 1:33 AM
So just to update this post.
In the end It was related to our own webhook hubspot application we had implemented feeding back into our server, which aimed to stop hubspot deals/contacts being created and then we deleted them. So entirely our fault 🙂
Oct 31, 2022 6:17 PM
Hi Lee, good catch on the V1, i'll investigate that now.
As far as the deal_id being there, I have not been able to verify it. I can see that I'm getting successful 200's and 204's on other post and patch requests, but then suddenly it dissapears as if it was deleted. I've checked the portal id to ensure it's creating against the correct portal and that is correct.
Oct 31, 2022 12:06 AM
Hi there,
Could I get more information on what you meant by 404 during subsequent updates?
Any screenshots of your postman params, endpoints, etc. would be useful in describing the issue you are facing. Hope to be able to assist!
Cheers
WL
Oct 31, 2022 2:11 AM
Hi, so I'm using the npm package that wraps the hubspot client.
So initially as you saw in the original screenshot, it's working as a creation, but then shortly after it seems to dissapear
Oct 31, 2022 3:01 AM
Hi there,
From your logs it feels like the endpoint could be wrong. An update to the deals api should be patch instead:
PATCH /crm/v3/objects/deals/{dealId}
If you're using the Nodejs library, it should also be automatically wrapped into a v3 api call instead of v1. Are you using this command?
hubspotClient.crm.deals.basicApi.update(dealId, SimplePublicObjectInput, idProperty);
You can refer to the documentation for the sample code for node: https://developers.hubspot.com/docs/api/crm/deals
Also, could you verify that deal_id 10748174711 exists in your portal? You can see the ID in the url when you navigate to Sales > Deals.
Happy to help debug further!
Cheers
WL
Oct 31, 2022 8:20 PM
So I had done some debugging, to the point where I'm just simply creating the deal and no long doing the updates. I'm using the V3 endpoint for creation, and I can see that there is a successful create,
However when I then go to access the deal via it's deal id, yeah it's not there.
Nov 1, 2022 6:58 PM
@weiliang_lee Any further thoughts on this? We need to switch over our api key to private apps by end of this month, so this is extremely business critical. If you can elevate this, or if you could check what happened to some specific deals/contacts within our account I would greatly appreciate it.
Nov 1, 2022 9:56 PM
Hello there, I've dropped you a private note with my details. Happy to help check it out when I get the time this evening!