Hi,
Is it possible to use HTTP_OAuth with the api? I have a server that can't instal oath extension and have been trying the pear version instead. It seems to be fine with all the GET calls (materials etc) but POST always returns and invalid signature. I am guessing it has to do with the encoding of the json string and how parameters are passed...
try {
$oauth = new HTTP_OAuth_Consumer($consumer_key, $consumer_secret,$access_token,$access_secret);
} catch (OAuthException2 $e){
var_dump($e);
}
try {
$filename = "cube-1cm3-centered_in_meter.stl";
$file = file_get_contents($filename);
$data = array('fileName' => $filename,
'file' => rawurlencode(base64_encode($file)),
'hasRightsToModel' => 1,
'acceptTermsAndConditions' => 1,
);
$data_string = array(json_encode($data));
$response = $oauth->sendRequest("
https://api.shapeways.com/model/v1", $data_string);
var_dump($response->getBody());
} catch (OAuthException2 $e){
var_dump($e);
}