12-13-2016 06:45 AM
Hello,
what is the best way for calling Alfresco webscript (with autentication) via URL request from external Java application?
I need to send authenticated (username and password) request to Alfresco via URL and fetch JSON back to Java application.
Is there some code example to check?
Thank you.
Br, Vojtech
12-13-2016 10:09 AM
Hi Molin,
You can use token mechanism of alfresco.
First get alfresco token using username and password and then use that token to call webscript.
Thanks,
Yogesh Prajapati
12-13-2016 10:29 AM
It is better to use proper names in referring to authentication mechanisms because you will likely not find anything in the documentation about "token mechanism". is referring to Alfresco's authentication ticket feature where you call the /alfresco/s/api/login ReST operation first to authentication using username + password in the JSON POST request which will give you an authentication ticket. This ticket can then be used as a URL parameter called "alf_ticket" in any subsequent web script calls using /alfresco/s/ as the service endpoint to re-use the previously validated login.
12-13-2016 11:25 AM
Hello,
thank you both for explanation!
Br, Vojtech
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.