Solved

401 error when entering API Key in Workflow when entering webhook

  • 31 March 2021
  • 2 replies
  • 71 views

I want to let folks know about what I think is a very common error folks might have when creating a workflow that uses a webhook to update a Freshworks service. I found nothing on this topic so I decided to post to the forum to let other folks know.

When entering API key in the “Required authentication” field as follows:

 

You need to use the correct syntax.   The value you have to enter for API Key is NOT JUST the secret.  You need to enter the following syntax:
 
Token token=****
 

I have stumbled on this a couple of times.  If you don’t use this syntax, you get a 401 error - even though you have the API Key exactly right.  

 

@Freshworks team, I suggest the UI be improved though I guess this dialog is meant to be for any REST Service (not just Freshworks). That said, its too easy to just assume you need to enter API key when really what you want is the contents of the “Authorization” header.  SO maybe a better label for this field is “Authorization header”.

icon

Best answer by Aishwarya Parthasarathi 5 April 2021, 08:06

Hey Steve, 

Greetings from the Freshworks CRM team. 

Thanks for sharing this with the forum. We have given this information in the API document here - https://developer.freshsales.io/api/#authentication on how the format of entering the API key should be. 

I hope this helps. 

View original

2 replies

Badge

Hey Steve, 

Greetings from the Freshworks CRM team. 

Thanks for sharing this with the forum. We have given this information in the API document here - https://developer.freshsales.io/api/#authentication on how the format of entering the API key should be. 

I hope this helps. 

Thank you for considering this mater.  I would like to point out that a user creating an workflow may not  refer to the API document you referenced.  

 

Further. the user interface does not suggest anything other than provide an “API key”.  If the user interface in for the workflow asked for “Authorization header” then I think the confusion would be omitted.

 

Reply