You are viewing limited content. For full access, please sign in.

Question

Question

How do you authenticate to the Workflow API endpoints?

asked on August 9, 2023

Hello Laserfiche community!

 

I tried running a POST call to the http://localhost/Workflow/api/instances/{WORKFLOWNAME} endpoint, but I am getting "401 - Unauthorized: Access is denied due to invalid credentials." How do I pass credentials through the request?

 

Thank you!

0 0

Answer

SELECTED ANSWER
replied on August 14, 2023

Hi Michelle,

By default, the Workflow Web Service (API) uses IIS Windows Authentication (Kerberos/NTLM).

If you make the API call from something that can authenticate that way (e.g., Workflow itself or other Windows services), it'll generally work automatically you're good to go. Many API testing clients like Postman cannot, so you'll get that 401 Unauthorized. You can test making API calls from Workflow itself with the demo Workflows I've attached (drop the .txt and import).

You can optionally enable Basic Authentication on the Workflow IIS application (within IIS) and pass credentials for basic auth. If you go this route, please be conscientious of the security implications.

1 0
replied on August 14, 2023

Thank you Samuel!

0 0

Replies

replied on November 1, 2023

hi @Samuel Carson   Not exactly the same question but also related to workflow web service and authentication.

Another thread here: https://answers.laserfiche.com/questions/188112/Adding-WF-Web-Service-Reference-to-Visual-Studio-project-fails#188135

 

Can you comment on that?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.