Troubleshooting Webhooks

Hello!
I’m attempting to set up webhooks between HubSpot and a third-party app called Clio Manage. There is a native integration, but it’s created a data nightmare. So it makes sense to reign things in programatically, and it seems like webhooks would be the perfect way to do this.

Importantly, I’m attempting to use webhooks via HubSpot workflow. HubSpot is connecting to Clio and Clio is issuing a token. Things are falling apart from there, it seems.

I contacted Clio’s support and eventually got to this from them:

I do see that you have the response type in your Authorization Request set up to be

code.

While this certainly can be done, its unusual for marketed application to push this to end users. For context when the response is set to code the Clio Authorization Page (when Approved) will send a JSON response to the redirect URI including an Authorization Code that must be returned through a POST request to be exchanged for an

access_token.

Again, while this is perfectly valid and not unusual for self developed applications, I would expect Integrations like Hubspot to be using

state

as the response type. More on the distinction between the two can be found in the documentation you are referencing.
Does Hubspot allow you to read the specific JSON response given?

So I’m reaching out here for advice. I haven’t found and don’t recall any mention of

**state

.**
And, for reference, the way my request URI is currently constructing after hitting the Clio side is like:
https://api.hubapi.com/oauth/v1/token?code=[xyz]
I haven’t cnofigured all this before, so it’s very possibly somethign quite basic…
Any thoughts/insight? What other info can I provide?

Hi, @Clare_HS :waving_hand: I didn’t find any community posts from users trying to use the `state`, the Clio API endpoints, and HubSpot.

The documentation they linked you to about `state` doesn’t seem to give an example that will resolve your issue. Here’s the mention of using `state` and OAuth with HubSpot — State.

If you find a solution, please consider sharing it here, as it will likely help others who are attempting similar solutions.

Beset,

Jaycee