Rest API authorization failed.

cancel
Showing results for 
Search instead for 
Did you mean: 
vikash_patel
Established Member

Rest API authorization failed.

Jump to solution

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 Solution

Accepted Solutions
ryandawson
Alfresco Employee

Re: Rest API authorization failed.

Jump to solution

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 solution in original post

1 Reply
ryandawson
Alfresco Employee

Re: Rest API authorization failed.

Jump to solution

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 solution in original post