I'm using the ryanwinchester/hubspot-php library version ~1.2. We dynamically create the properties for the request based on the information in our website. We save the company id in our website so when we update the company we already have the id. I catch any errors and log them. The error i'm recieving is:
Do you have the request URL from that error log? I know you said you're making a PUT to https://api.hubapi.com/companies/v2/companies/{$id}, but do you have an example URL for one of your requests? It should be possible to make a PUT request to that endpoint (https://developers.hubspot.com/docs/methods/companies/update_company), so I wonder if your request is just going somewhere else that doesn't allow a PUT request. You could also try creating an issue for it here: https://github.com/ryanwinchester/hubspot-php/issues. It seems like other people have posted questions specific to that API client as issues; maybe someone else has come across this. But if you have an example request URL, I'm happy to look a little closer at what's going on here, because you shouldn't be getting a 405 to that endpoint.
Sep 19, 20192:48 AM - edited Sep 19, 20193:09 AM
Member
405 Method not allowed
SOLVE
The request is generated by the library. I have an example of the request that is being generated. Unfortunetly i can't seem to reproduce the error on my local. And i don't capture the request information in our live server. [19-Sep-2019 06:42:10 UTC] put