07-26-2023, 02:42 PM
In the Prestashop backend I activated the webservice and I created an authentication key. Testing in browser works well but now I want to access the webservice via JavaScript in a Cordova application.
The response I am getting is `401 (Unauthorized)`. I'm performing this ajax call (using AngularJS):
$http.get('http://[email protected]/api/employees/2', {})
How do I have to send the authentication key?
I've been searching on the Internet but I did not found anything interesting that solves my problem.
The response I am getting is `401 (Unauthorized)`. I'm performing this ajax call (using AngularJS):
$http.get('http://[email protected]/api/employees/2', {})
How do I have to send the authentication key?
I've been searching on the Internet but I did not found anything interesting that solves my problem.