I'm having trouble authenticating myself with the rest service.
I attempted to use this library to generate all the necessary parameters as mentioned here, and I constructed the request like this:
$scope.oauth = new OAuth({
consumer: {
public: 'ck_d34c32d9c7f6fc1ddb6e85879fc4de89',
secret: 'cs_1867e5e54ce054dde7cf463ad78ee6f9'
},
signature_method: 'HMAC-SHA1'
});
var request_data = {
url: 'http://belfiore.link-me.it/wc-api/v1/orders',
method: 'GET',
}
$scope.data = $scope.oauth.authorize(request_data);
$scope.url = rawurlencode(request_data.url) + "&" +
"oauth_consumer_key"+"%3D"+rawurlencode($scope.data.oauth_consumer_key)+
"%26"+"oauth_nonce"+"%3D"+rawurlencode($scope.data.oauth_nonce)+
"%26"+"oauth_signature_method"+"%3D"+rawurlencode($scope.data.oauth_signature_method)+
"%26"+"oauth_timestamp"+"%3D"+rawurlencode($scope.data.oauth_timestamp)+
"%26"+"oauth_signature"+"%3D"+rawurlencode($scope.data.oauth_signature);
var call = $http.get($scope.url);
call.success(function(res) {
console.log(res);
});
call.error(function(res) {
console.log(res);
});
However, I keep receiving this response:
"Cannot GET /http%3A%2F%2Fbelfiore.link-me.it%2Fwc-api%2Fv1%2Forders&oauth_consumer_key%3Dck_d34c32d9c7f6fc1ddb6e85879fc4de89%26oauth_nonce%3DwkeLtFTh6WAuxDQGqnpzxAWYOQiHnHSr%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D10%26oauth_signature%3DjFhPbKHnvMEvYf20w1vN3TAV5Ds%3D"
Can anyone provide assistance? I have searched online for tutorials or an Angular-ready OAuth1 library but have not found anything...
Thank you in advance