Question

K2 Workflow API

  • 14 March 2019
  • 3 replies
  • 60 views

In K2 Cloud Management we have done the following referring to the URL,

  1. Enabled the Workflow REST API and exposed the endpoints to authorized users.
  2. We have shared the Swagger file and the Base endpoint URL for consumption.
  3. We have added the Domain under the Domains allowed.

 

Then tried consuming the API from the application but we got 401 Unauthorized error. We also tried from POSTMAN by passing the Basic Auth (AAD Credentials). Can you please let us know what are we missing in the process.

 

Regards,

Thileeban.C


3 replies

Good day thileeban

 

May you please follow this link for a deatailed process of consuming a workflow:

https://help.k2.com/onlinehelp/k2cloud/userguide/current/default.htm#K2-Management-Site/Integration/Workflow-REST-API.htm%3FTocPath%3DAdminister%7CK2%2520Management%7CIntegration%7CAPI%2520Configuration%7C_____1

 

Please mark this as a solution or Kudo it if this document was helpful in resolving your issue

 

Thank You

 

Kind regards

Thabang

 

Kind regards

Hi @thileeban

 

I understand your concern but your question be how to solve that 401 authentication error?

 

This seems like a typical issue issue to me and it was solved in this articles, kindly follow up with this links (http://blackmail.k2.com/messages/Consuming-K2-Endpoints-for-workflow-Client-API-The-WCF.svc-endpoint---Authentication-Issues-WCF-Experts-Notice.html),  https://help.k2.com/kb002029 and attempt to recorver where you have missed your steps.

 

Thank you.

 

should you find information from the above links useful or leading you to the answer please mark as "Accepted Solution and/or Kudo" , to assist other k2 masses encountering similar issue as yours.

 

Best regards;

Widson.

 

[K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member]

Hello thileeban,

It sounds like you may still need to grant workflow premissions to the AAD User you are using for Basic Auth. This is done on the management site for your environment under the Workflow Server tab. Expand "Workflows" and find the workflow you are trying to start/view/etc. Under the "Rights" tab, add your AAD user account and check the desired boxes to grand that user the rights you need.

After that you should be able to successfully call the workflow methods using basic auth from Postman or any other method.

~ Andrew

Reply