APIs & Integrations

MicoleDev
Member

Webhook settings update wont work

SOLVE

We are experiencing issues while coding around webhook endpoints following documentation bellow for PHP:

https://developers.hubspot.com/docs/api/webhooks

Endpoint: /webhooks/v3/{appId}/settings

We do use last updated hubspot/api-client composer library

In the documentation sample there is a line of code that isnt recognized by the hubspot library:

use HubSpot\Client\Webhooks\Settings\Model\SettingsChangeRequest;

 

This class just doesnt exists at all in hubspot library so we get following error:

Class "HubSpot\Client\Webhooks\Settings\Model\SettingsChangeRequest" not found


Not only that but some functions or properties are not accesible, for example:

$this->hubspot->webhooks()->settings()


will throw this error:

Unable to discover "settings" client


Are webhooks usable at all on PHP library? Anyone knows how to fix this issue please?

I guess we can make our own curl requests but thats not what we want to be honest.

Thanks in advance

0 Upvotes
1 Accepted solution
Mike_Eastwood
Solution
Key Advisor | Gold Partner
Key Advisor | Gold Partner

Webhook settings update wont work

SOLVE

Hi @MicoleDev 

 

There are gaps in all the SDKs, partly because of the constant improments to the API by the team at HubSpot.

 

What I do is use the client to make custom calls to the API:

 

$endpoint = 'https://api.hubapi.com/settings/v3/endpoint-not-covered-in-sdk';
$response = $this->hubspot->getClient()->request('get', $endpoint);

You can also pass in parameters for Post or other calls.

 

Have fun

Mike

 

p.s. thanks for the mention @Jaycee_Lewis 

 

View solution in original post

0 Upvotes
2 Replies 2
Mike_Eastwood
Solution
Key Advisor | Gold Partner
Key Advisor | Gold Partner

Webhook settings update wont work

SOLVE

Hi @MicoleDev 

 

There are gaps in all the SDKs, partly because of the constant improments to the API by the team at HubSpot.

 

What I do is use the client to make custom calls to the API:

 

$endpoint = 'https://api.hubapi.com/settings/v3/endpoint-not-covered-in-sdk';
$response = $this->hubspot->getClient()->request('get', $endpoint);

You can also pass in parameters for Post or other calls.

 

Have fun

Mike

 

p.s. thanks for the mention @Jaycee_Lewis 

 

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Webhook settings update wont work

SOLVE

Hi, @MicoleDev 👋 Thanks for the question. Hey, @tominal @Mike_Eastwood, do you have any tips you can share with @MicoleDev?

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes