Hello.
I’m trying to use the angular SDK but always get a 401 (Unauthorized).
Already set config:
.constant('DSP_URL', 'http://myaddress.com')
.constant('DSP_API_KEY', 'myapp')
.config(['$httpProvider', 'DSP_API_KEY', function($httpProvider, DSP_API_KEY) {
$httpProvider.defaults.headers.common['X-DreamFactory-Application-Name'] = DSP_API_KEY;
}])
then I can login:
$scope.$on('api:ready', function(event) {
console.debug('ready');
DreamFactory.api.user.login($scope.creds, .....
});
and I get a successful response, so I’m logged in.
On the following code is where a get a 401 error
DreamFactory.api.feng.getRecords({"table_name":"fo_project_tasks"}).then(.....
I’ve created the service, created roles (even no need for it, because a login as an admin), allowed * in CORS, but still no luck.
Any advice will be welcome.
Best regards.