cancel
Showing results for 
Search instead for 
Did you mean: 

Rest API authorization failed.

vikash_patel
Star Contributor
Star Contributor

I am calling rest APIs from outside activiti from a stand alone page simply on a button click "http://admin:test@localhost:8080/activiti-rest/service/runtime/process-instances " and it is giving error 401 (Unauthorized) 

I found that for authorization we can include user name and password in the requested url from Activiti User Guide
how to make authenticated rest api call please help.
Thank you,

1 ACCEPTED ANSWER

ryandawson
Elite Collaborator
Elite Collaborator

I assume you're trying to use the REST API for the V6 community edition. It certainly does use basic authentication (Activiti/BasicAuthenticationProvider.java at 6.0-release · Activiti/Activiti · GitHub - if you're running from source code you could breakpoint or add logging at that class) so I'd expect that to work provided the admin/test user is in your database. I'd suggest checking whether it is in your database. You could also try from postman and adding the authentication header there.

View answer in original post

1 REPLY 1

ryandawson
Elite Collaborator
Elite Collaborator

I assume you're trying to use the REST API for the V6 community edition. It certainly does use basic authentication (Activiti/BasicAuthenticationProvider.java at 6.0-release · Activiti/Activiti · GitHub - if you're running from source code you could breakpoint or add logging at that class) so I'd expect that to work provided the admin/test user is in your database. I'd suggest checking whether it is in your database. You could also try from postman and adding the authentication header there.

Welcome to the new Hyland Connect. Get started or submit feedback.