I am trying to build an app with ionic which uses information in a drupal site. I could get authentication with user login in my app. When i try to login i am facing with this json code:
sessid: "vn8a-4gUCc6ZYUHeyCZMA4mYyDEGny3Gvxa15Ft5Bns",
session_name: "SESS3d0229a2305c5756586d8cb91ca04346",
token: "w1vGqxj4NG8DTt818L-PrXb8ZKZnRarHK8bBMPsbCxg",
I think this values are proper. On the other hand when i try to get views with anonymous user i can get them. However when i try to get views which requires authentication with this code fragment:
$http({
method :'GET',
url:'http://www.example.com/latest-feeds',
data: { sessid : app.authInfo.sessid,
session_name : app.authInfo.session_name ,
token : app.authInfo.token
},
headers: {'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
}
}).success(function (data, status, headers, config) {
console.log('status',status);
console.log('data',data);
console.log('headers',headers);
});
i am facing with Invalid HTTP status code 403 error. I found that this error is about authentication.
On the drupal site i created a REST service to authorize people and created view which gives related views to me.
How can i solve this problem?