Best answer

Clio Integration: 401 on "API Request (Beta) in Clio" for any Clio Manage api request - Bug?

  • 21 March 2024
  • 8 replies
  • 52 views

Userlevel 1

When attempting to identify a client by name in Clio Manage, through Zapier, there is one built-in method:

  • Find Person Contact (shown below)

 

This feature is insufficient for my needs, as there exists the possibility that there might be two people with the same name.  “Find a person” will return only one, even if there are several with the same name.  Will it be the right one?  Who knows?  I certainly don’t want to cross-contaminate confidential case information from one John Smith to a different John Smith. At this stage of the workflow, I do not have their ID, otherwise I would be using that.

Fair enough, I’ll just directly make a call to the API, right?  I do this everywhere else in Zapier and it works just fine, calls to Google Drive which aren’t directly supported, etc.  So, this is assumed to be a known quantity of functionality.  However, when I try to engage Clio’s contacts.json API call through the “ API Request (Beta) in Clio” Zapier action, I get a 401 error.  So, as one does, I try to make sure that it isn’t just the one call I’m getting wrong. Every documented call I try comes back with the same issue.

I made sure that the request headers include Content-Type: application/json  and Accepts: application/json

I tried using the Custom Actions builder which assures me that “Authentication headers are included automatically.” which is great because 1. I don’t want to build in my own OAuth2 layer and 2. I don’t want to embed credentials into the Zap.

However, 401 every single time.  I go over to Make.com (formerly Integromat) and create a connection to that same API call, and poof… it just works. All the data you can eat for $9.95.  So, the API documentation isn’t faulty.

The only thing I can surmise is that the Bearer token is not properly being embedded in the request header.  I tried making a call to another domain in order to see the bearer token, but Zapier protects against sending the data to an unexpected server, so I have no way of proving or disproving this other than being completely unable to make any direct API calls using Zapier’s “API Request (Beta) in Clio” action.

 

Request

 

Response

 

“Just works” using Make.com (formerly Integromat)

 

 

So, after all of the painstaking details to ensure I address all the standard “did you try” and diagnostic inquiry:

Is there something I missed?  Some magical setting that suddenly resolves the 401 which should be addressed by the baked-in bearer token?  Or is this just a bug in Zapier?

icon

Best answer by SamB 26 March 2024, 11:07

View original

8 replies

Userlevel 1

It’s been longer than an hour, @Troy Tessalone -- where’s the hero our city needs?

Userlevel 7
Badge +14

Hi @Process Agilist 

Please post the link to the app API endpoint documentation you referenced to configure your Zap action.

Userlevel 7
Badge +14

@Process Agilist 

Try removing this Header or changing it to singular: Accept

 

https://docs.developers.clio.com/api-reference/#tag/Contacts/operation/Contact#index

Userlevel 1

Hi @Process Agilist 

Please post the link to the app API endpoint documentation you referenced to configure your Zap action.

It was linked, but it looks like you found it.

Userlevel 1

Okay… I tried it with singular Accept in the header (wouldn’t be the first time a single letter broke some code, now would it?)… to no avail.

Removing from the header was also in my initial troubleshooting steps.  Tried again, because… well, why not?  ANNNND… yeah.. still didn’t change anything.

Coming back unauthorized.  Looks like I’ll have to try the OAuth2 route.  In the meantime, I have the process working perfectly by calling my Make.com webhook that does exactly what I expect.  But that just feels “wrong”.

Thank you for your extra set of eyes @Troy Tessalone -- I really appreciate it.

Userlevel 7
Badge +11

Hi there @Process Agilist! 👋

I did some testing in my own Zap and couldn’t get it working either. So I did some further digging discovered that this issue is indeed caused by a bug with the API Request action for the Clio app, that causes the access token to not be passed in the Authorization header - resulting in a 401 “unauthorizedError” error. So I’ve added you to the list of folks being affected by this bug. While I can't give any sort of timeline on when it will be resolved by, we will definitely let you know once a fix is released!
 
In the meantime, you might be able to get this working using Webhooks action instead as that app shouldn’t run into the same bug. If you’re interested in giving that a try please see our Send webhooks in Zaps guide to learn more about how to work with Webhooks in Zaps.

If you run into any issues in using that workaround do let us know, happy to help further! 🙂

Userlevel 1

Thank you so much @SamB!  It’s quite reassuring that I’ve neither grown insane nor incompetent.  Thank you for the validation of the defect, my competence, and my sanity.

 

I already have a viable workaround in place. I’ll see about Zapifying that workaround so the solution is pure Zapier after I knock a few other high-criticality stages of the workflow -- “Agile Everywhere!”

Userlevel 7
Badge +11

I’m so pleased I could help on that @Process Agilist! 🤗

Glad to hear you’ve already got a workaround in place for the moment. We’ll keep this thread updated with any news we have to share on that bug. If there’s anything else I can assist with in the meantime just let me know.

Reply