Search Search  
Today's Messages (OFF)  | Unanswered Messages (ON)

Forum: Shapeways API
 Topic: Accessing Shapeways API using Facebook authentication ?
Accessing Shapeways API using Facebook authentication ? [message #146448] Fri, 20 May 2016 11:48 UTC
avatar dshariff  is currently offline dshariff
Messages: 2
Registered: June 2013
Go to my shop
Junior Member
In the www.shapeways.com UI page, I can login using Facebook and upload models. I would like to do the same via API. So, I need to access the upload API using Facebook as my OAuth provider. Is this possible ?
 Topic: Updating title and tags via API not working?
Updating title and tags via API not working? [message #136372] Thu, 04 February 2016 15:01 UTC
avatar robs_mw  is currently offline robs_mw
Messages: 48
Registered: May 2010
Go to my shop
Member
Hi,

I'm trying to update the title and tags of a model via the API, but it doesn't seem to work, although the response I'm getting is 'success'.

tags are not updated at all (I'm supplying an array of strings to the function), and title is ONLY updated on the Edit/Model and Edit/Selling page,
but NOT on the Edit/Details page (neither the header as the Title on that page).
The public visible product page is also not updated. A bit weird.
See attached screen-shots.

Other functions like updating the description, setting a model to Public, changing the defaultMaterialId all work without a problem.
Retrieving all model information is also working without a problem.

Anybody any experiences with this?
(note that I did wait quite a while for anything to change, but it didn't -and most changes so far seem instantly-;
furthermore I also checked the result via the API get functions)

*changing the title:

output of script: (I replaced the actual modelId with xxxxxxx)
[...]
{"modelId":"xxxxxxx","title":"testCube"} <- print_r of data_string
DONE
stdClass Object <- print_r of json
(
[result] => success <- OK
[modelId] => xxxxxxx
[modelVersion] => 0
[title] => TestCube2 <- not changed
[description] => a testcube
[isPublic] => 1

PHP code snippet:
[...]
$data_string = json_encode($data);

print_r($data_string); <- print_r of data_string
echo "\n";

try {
# update the value
$oauth->fetch($api_url_base ."/models/$modelId/info/v1", $data_string, OAUTH_HTTP_METHOD_PUT, array("Accept" => "application/json"));
$response = $oauth->getLastResponse();
$json = json_decode($response);
if (null == $json) {
PrintJsonLastError();
var_dump($response);
} else {
echo "DONE\n";
print_r($json); <- print_r of json
} # if

*changing the tags
output of script: (I replaced the actual modelId with xxxxxxx)
[...]
Array <- print_r of tags_array
(
[0] => 1/87
[1] => 1:87
[2] => cube
[3] => HO Scale
[4] => 'solid cube'
[5] => test
)
{"modelId":"xxxxxxx","tags":"Array"} <- print_r of data_string
DONE
stdClass Object <- print_r of json
(
[result] => success <- OK
[modelId] => xxxxxxx
[modelVersion] => 0
[title] => TestCube2

PHP code snippet:
print_r($tags_array); <- print_r of tags_array
$data = array("modelId" => "$modelId", "$function" => "$tags_array");
$data_string = json_encode($data);
<rest as above>

Best regards,
Robert




Rob's Model Workshop
http://www.shapeways.com/shops/rmw
http://robs-mw.com
 Topic: Oauth and Curl; uploading a model
Oauth and Curl; uploading a model [message #136118] Tue, 02 February 2016 21:11 UTC
avatar xristiaan  is currently offline xristiaan
Messages: 5
Registered: July 2011
Go to my shop
Junior Member
Regrettably my hosting provider does not support Oauth on PHP. I have managed to get an access_token using a Curl implementation based on AuthorizeWithRequestUriQuery-oauth1-curl.php but I am stuck with uploading a model. Shapeways doesn't have an example of doing a POST and even after spending a couple of evenings of trying various ideas, I can't find anything that works. I would really appreciate it if someone could point me to a working example
 Topic: OAuth Exception : Invalid auth/bad request while uploading
OAuth Exception : Invalid auth/bad request while uploading [message #126611] Thu, 19 November 2015 11:29 UTC
avatar minichua  is currently offline minichua
Messages: 17
Registered: November 2013
Go to my shop
Junior Member
Hello,

when I try requests like 'GET /materials/v1', 'GET /materials/$materialId/v1', 'GET /models/v1', 'GET /models/$modelId/v1' everything works fine but when I try to upload a model with a request like 'POST /models/v1' I get the following error:

A fatal error occurred during fetch exception
Exception : Invalid auth/bad request (got a 400, expected HTTP/1.1 20X or a redirect)

I am using the gitHub PHP-PECL scripts (copy-paste).

Does anyone knows where it could come from?

[Updated on: Thu, 19 November 2015 15:54 UTC]


Minichua Design
 Topic: Can others buy my private model?
Can others buy my private model? [message #124448] Fri, 23 October 2015 04:39 UTC
avatar toendex  is currently offline toendex
Messages: 0
Registered: September 2015
Go to all my models
Junior Member
Hello,

I have a question about private model.

I use shapeways PHP API to upload model and set it to private but isForSale. I get a private model url back from the API which contains a key for the model. I notice that any other users can open this private model url through normal browser, add it to their carts and able to press the "checkout" button. I haven't really try to finish the payment step, but I wonder if other users can really buy the model and have it printed by shapeways if they have the private url (with model key) of it?

The private url is like this: http://www.shapeways.com/product/XXXXXXXXXX/model-name?key=X XXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thanks a lot.
 Topic: How can I know whether my model is ready through API?
How can I know whether my model is ready through API? [message #124447] Fri, 23 October 2015 04:31 UTC
avatar toendex  is currently offline toendex
Messages: 0
Registered: September 2015
Go to all my models
Junior Member
Hello,

I use the PHP API. I notice that if I get-model-info from API immediately after I finish uploading model file (also through API) to shapeways, the model is not ready (I see the price of the model is 0, which I assume it is not ready). If I get-model-info fro API after a while, I can see the price which is not 0 for some materials.

My question is : is it true that if I see the price is not 0, I can think the model has past the printable checking and available for printing without any problems? If so, is there any other ways to check whether the model is ready to print using API? Also, if the model has some problems which make it not printable (thin wall for example), how can I get that information through API?

I try to upload some model which only has two separate surface (which should be an invalid model), and find that I can still add it to cart and check out it. I wonder what will happened if I finish the checkout and payment? Will shapeways send the "bad" model to me, or just notify me that it is not printable and just cancel the order?

It is a bit of much questions to ask at one time. XD

Thanks!
 Topic: How can I buy other's private model if I have their secret Key
How can I buy other's private model if I have their secret Key [message #124249] Mon, 19 October 2015 03:10 UTC
avatar toendex  is currently offline toendex
Messages: 0
Registered: September 2015
Go to all my models
Junior Member
Hello,

I am developing an App. I have some models in my shapeways account as private models, and the App let users (who has their own shapeways account) to buy it. I toke an experiment and find that I can give user private-model-url with secret-key to let them at least put the model into their cart manually using web browser (I haven't test if they can check out and pay for it). I wonder if there is any API that can make this process automatically. I have looked the "POST /orders/cart/v1" API and it doesn't take an private-model-secret-key so it means this API doesn't allow to add other's private model to cart?

Thanks.

-toendex
 Topic: Instant pricing for a given modelID and materialID
Instant pricing for a given modelID and materialID [message #123928] Mon, 12 October 2015 02:28 UTC
avatar REAppTesting  is currently offline REAppTesting
Messages: 0
Registered: June 2015
Go to all my models
Junior Member
Currently to get instant pricing,you need to provide volume, surface area, bounding box info like this.

$volume = 1 / (100*100*100); // 1 cm^3 in m^3
$area = 600 / (1000*1000); // 600 mm^2 (6 cm^2) in m^2
$xBoundMin = -0.01; // 1 cm in m
$yBoundMin = -0.01;
$zBoundMin = -0.01;
$xBoundMax = 0.01;
$yBoundMax = 0.01;
$zBoundMax = 0.01;
$materials = array(6, 25);
$data = array(
"volume" => $volume,
"area" => $area,
"xBoundMin" => $xBoundMin,
"xBoundMax" => $xBoundMax,
"yBoundMin" => $yBoundMin,
"yBoundMax" => $yBoundMax,
"zBoundMin" => $zBoundMin,
"zBoundMax" => $zBoundMax,
"materials" => $materials,
);
$data_string = json_encode($data);

$oauth->fetch(
$api_url_base ."/price/v1",
$data_string,
OAUTH_HTTP_METHOD_POST
);
$response = $oauth->getLastResponse();
$json = json_decode($response);


Is there a way to get instant quotes given a modelID (obtained after uploading mode to Shapeways) and a materialID. Its a very basic functionality and should already be part of the API. Is it possible right now? Am I missing something?

If not, is it possible to somehow get volume, surface area, bounding box info of uploaded model through Shapeways API?
 Topic: Mr. Sneaker Head a customizable Sneaker model Kit ( and my first try at Shapeways API)
Mr. Sneaker Head a customizable Sneaker model Kit ( and my first try at Shapeways API) [message #123326] Fri, 25 September 2015 16:57 UTC
avatar keno  is currently offline keno
Messages: 0
Registered: August 2008
Go to my shop
Junior Member
Hi Folks:

I just finished a 2 month project where I wanted to explore giving the end user a bit more control over customizing something 3D printed, I chose a Toy Sneaker Model Kit because I also design footwear on the side and picking the colors is a lot of fun.

The project has been live for a few days now and thought I would share it here:

http://www.k3no.com/projects/MrSneakerhead.html

index.php?t=getfile&id=117800&private=0

Cheers
Keno

 Topic: Instant quote right after uploading model using modelID without delay
Instant quote right after uploading model using modelID without delay [message #123086] Sat, 19 September 2015 16:49 UTC
avatar REAppTesting  is currently offline REAppTesting
Messages: 0
Registered: June 2015
Go to all my models
Junior Member
I use shapeways API to upload model. Then the script uses the returned modelID to get instant quote right after uploading the model.

The problem is pricing API returns price as 0 (since I believe it does some processing on the model in the background). However, if I use the same modelID and same script after few minutes (approx. 5 mins), I get the model pricing. Is there any way to get the model pricing immediately after uploading the model using its modelID without any delay?

Is anyone else facing similar problem? Any suggested solutions?

Thank you!
-Prasad
 Topic: Shapeways in wordpress.com?
Shapeways in wordpress.com? [message #122596] Thu, 10 September 2015 15:27 UTC
avatar lrplana  is currently offline lrplana
Messages: 0
Registered: May 2015
Go to my shop
Junior Member
Please, as I can embed embed widget of shapeways in wordpress.com because the iframe not working.

Many thanks for your time.
 Topic: Feature request: setting youtube video via API
Feature request: setting youtube video via API [message #121508] Thu, 20 August 2015 18:37 UTC
avatar UtorCase  is currently offline UtorCase
Messages: 43
Registered: October 2013
Go to my shop
Member
Dear SW Team,

I would love to be able to set the YouTube video via the API.

Cheers
 Topic: Checkout and Print code examples in action
Checkout and Print code examples in action [message #121121] Fri, 14 August 2015 01:08 UTC
avatar leessmith  is currently offline leessmith
Messages: 59
Registered: July 2013
Go to my shop
Member
Hey there,

I am looking at setting up a shop site for my shapeways products. Basically I just want to pull the products and options to my site and use the checkout and print options for people to cart up products and purchase.

I have zippo experience with this sort of thing and I 'assume' that I can port the code from the documentation into some sort of shopping cart template I am looking at tracking down, I am doing this through wordpress.

Has anyone had luck getting this to work, am I way off base thinking I can leverage the code examples on the Shapeways site and this will work, can I just plug in code elements into wordpress templates so the buy now, place order sort of aspects of this are covered off.

I was hoping to find some tutorials, but all I can see is chunks of code but no real indication on how to implement any of it.

Thanks for any information anyone can throw my way.

S.
 Topic: Error 500 when POSTing an order to the API
Error 500 when POSTing an order to the API [message #117531] Wed, 17 June 2015 10:25 UTC
avatar dhastings  is currently offline dhastings
Messages: 0
Registered: June 2015
Go to my shop
Junior Member
I am trying to send an order into an account. I have confirmed that the orders POST endpoint is enabled for my account. Initially responseFromServer was giving me error information such as invalid field. Now its blank and doesnt have any information at all, but the orders are still not showing up.


var request = (HttpWebRequest)WebRequest.Create(posturl);
                        json = "{\"firstName\":\"Kevin\",\"lastName\":\"Green\",\"country\":\"US\",\"state\":\"MN\",\"city\":\"Test Park\",\"address1\":\"1234 test street, NC-1234\",\"zipCode\":\"11111\",\"phoneNumber\":\"1111111111\",\"items\":{\"item\":[{\"modelId\":\"3436393\",\"materialId\":\"85\",\"quantity\":\"8\",\"productDimensionChoiceCombo\":\"0\"},{\"modelId\":\"3436421\",\"materialId\":\"85\",\"quantity\":\"4\",\"productDimensionChoiceCombo\":\"0\"}]},\"paymentVerificationId\":\"T-ORDER\",\"paymentMethod\":\"manual\",\"shippingOption\":\"Cheapest\"}";
            posturl = "http://api.shapeways.com/orders/v1";

            request.Headers.Add("Authorization", AuthHeaders);
            request.Method = "POST";
            request.ContentType = "application/json";
            request.Accept = "application/json";

            byte[] bodyBytes = new ASCIIEncoding().GetBytes(json);

            Stream stream = request.GetRequestStream();
            stream.Write(bodyBytes, 0, bodyBytes.Length);

            HttpWebResponse webResponse = null;

            try
            {
                webResponse = (HttpWebResponse)request.GetResponse();
            }
            catch (WebException ex)
            {
                webResponse = (HttpWebResponse)ex.Response;
            }

            if (webResponse != null)
            {
                Stream dataStream = webResponse.GetResponseStream();
                StreamReader postreader = new StreamReader(dataStream);
                string responseFromServer = postreader.ReadToEnd();
            }

[Updated on: Wed, 17 June 2015 10:34 UTC]

 Topic: API Sample Code - Bulk Uploader
API Sample Code - Bulk Uploader [message #114098] Sat, 18 April 2015 20:04 UTC
avatar stonysmith  is currently offline stonysmith
Messages: 2668
Registered: August 2008
Go to my shop
Shapie Expert
moderator
The question often comes up "How can I upload many models at once?" For a good while now, I've been using the API for various shop maintenance tasks, and I thought I'd share a bulk uploader that I whipped up.

Read the directions in the file. <grin> Check back from time to time.. if someone has suggestions, I'll update the tools.

The tools here require the Python programming language which is available for free from python.org.

Disclaimer: This set of tools is not for you unless you have at least minimal programming experience/skills, and/or the of desire to "do it yourself". If you want a completely pre-packaged "one button" solution, hire a programmer.

This code is shared here in the hopes that I can ease some of your frustrations. No warranty is implied.
If you'd like to say ThankYou, I'd be happy to accept donations thru PayPal. <grin>


Patience, Persistance, Politeness - the 3Ps will help us get us to Perfect Printed Products
 Topic: API used by Hero Forge?
API used by Hero Forge? [message #111542] Wed, 04 March 2015 18:15 UTC
avatar braillesigns  is currently offline braillesigns
Messages: 0
Registered: January 2015
Go to my shop
Junior Member
I just read the blog entry about hero forge and the shapeways "API".
Did I miss anything , is there a usable api now or is this still the "handle everything yourself, upload it once a day" solution?
 Topic: Get sales stats via model info
Get sales stats via model info [message #110532] Sun, 15 February 2015 06:09 UTC
avatar UtorCase  is currently offline UtorCase
Messages: 43
Registered: October 2013
Go to my shop
Member
Dear SW Dev team,

Would be great if we could get simple sales stats per model via the API. Even one simple field like number of purchase attempts would be great (so you dont have to factor in the rejections, cancellations etc).
 Topic: Wix App for API
Wix App for API [message #104542] Mon, 08 December 2014 20:27 UTC
avatar CESM  is currently offline CESM
Messages: 0
Registered: April 2013
Go to my shop
Junior Member
Hi,

I have been hunting high and low for any sort of app or code that can connect shapeways API to the wix sites. I currently am building my site and the only way for customers to buy my products is to redirect them through shapeways. I need a way that shapeways products can be automatically synced to the wix store, and when a customer buys a shapeways product the order is sent to shapeways. When customers buy products directly from me, then I get the order and I fulfill my part.

As an app this would be great, as it would make it possible for anyone with a wix site to buy from shapeways.

I am really looking forward to an app like this!

Best Regards,
David Cutting


-- David Cutting CEO, Cutting Edge Scale Models cescalemodels.com
 Topic: DOES ANYBODY WORK HERE?
DOES ANYBODY WORK HERE? [message #104219] Wed, 03 December 2014 12:58 UTC
avatar NickLilavois  is currently offline NickLilavois
Messages: 0
Registered: July 2011
Go to all my models
Junior Member
There are questions here that have been around for many years, including mine, and they remain unanswered.

Does Shapeways take it's small, independent developers seriously?

Is there any plan to make the API functional, and provide actual documentation, and example code in programming languages?

This is my program:

http://www.MediaUtopia.com

So far, it only works with iMaterialize, since iMaterialize has actively helped me integrate with their system. They seem to really want to encourage developers to support their service.

Sculpteo is now helping me work with theirs as well for my next version.

It is an iPad program, thus written in Objective-C.

I need ANY example code in Objective-C that performs OAuth and has been shown to work with Shapeways.

Every OAuth library I have been able to find for Objective-C is either intended for OAuth 2.0, while Sahpeways needs OAuth 1.0, or the library is very old and not maintained, and not compatible with iOS 7 and 8.

I have sent numerous emails, and I have gotten no response.

There MUST be a solution for this.

 Topic: verifier_invalid or signature_invalid with OAuth in Delphi XE
verifier_invalid or signature_invalid with OAuth in Delphi XE [message #101882] Tue, 28 October 2014 11:44 UTC
avatar Yggdrasil  is currently offline Yggdrasil
Messages: 0
Registered: June 2011
Go to all my models
Junior Member
Hello,

I'm trying to develop a working API-access using Delphi XE.
To achieve this I rely on an "library" to handle most of the the OAuth stuff (see attached file) because I'm not that familiar with the whole Web and OAuth stuff.
Lucky me got it working to retrieve the request token and the authentication url which the user has to visit to get the verifier (pin).

function RequestToken(out ARequestToken, ARequestSecret: string): string;
var
  tokenPos, delimPos: integer;

  apiSvc: string;
  http: TIdHttp;
  oAuthConsumer: TOAuthConsumer;
  oAuthRequest: TOAuthRequest;
  oAuthSignMethod: TOAuthSignatureMethod_HMAC_SHA1;
begin
  try
    // set api service url appendix used by this function
    apiSvc := 'oauth1/request_token/v1';
    // create http object to send get request
    http := TIdHttp.Create(nil);
    http.ConnectTimeout := 15000;
    http.ReadTimeout := 15000;

    // create OAuth objects
    oAuthConsumer := TOAuthConsumer.Create(Shapeways.SW_ConsumerKey,
      Shapeways.SW_ConsumerSecret, Shapeways.SW_APIURL + apiSvc);
    oAuthSignMethod := TOAuthSignatureMethod_HMAC_SHA1.Create;
    oAuthRequest := TOAuthRequest.Create(SW_APIURL + apiSvc);
    oAuthRequest := oAuthRequest.FromConsumerAndToken(oAuthConsumer, nil,
      Shapeways.SW_APIURL + apiSvc);
    oAuthRequest.Sign_Request(oAuthSignMethod, oAuthConsumer, nil);
    oAuthRequest.HTTPURL := Shapeways.SW_APIURL + apiSvc;
    // send GET request and decode response
    result := http.Get(Shapeways.SW_APIURL + apiSvc + '?' + oAuthRequest.GetString);
    result := TIdURI.URLDecode(result);

    // extract the request token from the response
    tokenPos := Pos('oauth_token', result) + 12;
    delimPos := Pos('&', result);
    ARequestToken := Copy(result, tokenPos, delimPos - tokenPos);

    tokenPos := Pos('oauth_token_secret', result) + 19;
    delimPos := LastCharPos(result, '&');
    ARequestSecret := Copy(result, tokenPos, delimPos - tokenPos);
  finally
    // free runtime instances
    FreeAndNil(http);
    FreeAndNil(oAuthConsumer);
    FreeAndNil(oAuthRequest);
    FreeAndNil(oAuthSignMethod);
  end;
end;

Remarks:
SW_APIURL points to 'http://api.shapeways.com/'
SW_ConsumerKey points to my shapeways app key
SW_ConsumerSecret points to my shapeways app secret

With this code I'm able to get the authentication url. When I open it in my browser I'm able to allow my app to access my account and as a result the verifier code is displayed (6 digits).
Unfortunately when using a similar function to create the access token url (with all parameters like signature, verifier, request token) I'm not able to get a successfull response (neither when opening inside a browser nor when using Delphi's IdHttp class).

When I include the oauth_verifier field with the verifier I got displayed in my browser inside the request before building the signature I get
{"result":"failure","reason":"Authentication Error","oauth_error_message":"oauth_problem=signature_invalid&debug_sbs=GET ... }

followed by my access token request url as far as I can identify it.

When I append the oauth_verifier field after building the signature I don't get the invalid signature result but an invalid verifier result.
{"result":"failure","reason":"Authentication Error","oauth_error_message":"oauth_problem=verifier_invalid"}


Do I have a significant wrong approach for the access token request and do I have to include other data or the existing one in a specific order?
The results I receive don't help me at this point and I'm stuck and left to try and error random things coming to my mind.
Does anyone have done API calls to shapeways using Delphi XE and give me a hint what to consider to solve my issue?
Or does anyone can point me on what I'm doing wrong at the moment.


Kind Regards

  • Attachment: OAuth.pas
    (Size: 15.29KB, Downloaded 59 time(s))

 Topic: Identifying if models have been purchased via API
Identifying if models have been purchased via API [message #100071] Thu, 02 October 2014 14:07 UTC
avatar zunath  is currently offline zunath
Messages: 0
Registered: February 2014
Go to my shop
Junior Member
We want to send follow up emails to users of our site based on whether they have ordered a model.

Is it possible to determine the number of times a model has been ordered via the Shapeways API? I couldn't find any information on this in the documentation.

Please let me know if there's a way to do this. Thanks in advance!
 Topic: Model Digital Preview
Model Digital Preview [message #99042] Mon, 22 September 2014 10:44 UTC
avatar Vira  is currently offline Vira
Messages: 0
Registered: November 2012
Go to my shop
Junior Member
Hey all,

I am excited by new Digital Preview mode that Shapeways implemented few months ago. Could anyone explain how Digital Preview renders the model exactly in the material that was chosen? Is it possible to create such preview for shop that outside the Sapeways?

As an example, I would like to have a sandstone fullcolor digital preview on the site.

Regards.
 Topic: OAuth question
OAuth question [message #98085] Sun, 07 September 2014 16:11 UTC
avatar leforthomas  is currently offline leforthomas
Messages: 0
Registered: March 2014
Go to all my models
Junior Member
I have a web app which helps the user generate a 3D model.

From teh web app, I have an "Upload to Shapeways" button at teh end of the creation process, but also a download the model button.

I don't want the user to leave my web app to sign in to shapeways, so I'm opening a new popup with teh auth URL I get from the Shapeways OAuth service. Problem is I'm getting stuck in many ways and my limited brain could do with a good example or workflow of how to proceed. Is there a suitable example I could use? all the ones I've seen leave the app or require signing in first (which I really don't want).

Thanks.

Thomas
 Topic: Can you buy shapeways modeling portion of their API and 3d print in house?
Can you buy shapeways modeling portion of their API and 3d print in house? [message #96415] Mon, 18 August 2014 18:11 UTC
avatar legacyb4u  is currently offline legacyb4u
Messages: 0
Registered: April 2014
Go to all my models
Junior Member
i was just curious if shapeways offered options to print in house with the use of their api?
 Topic: About PHP api
About PHP api [message #94843] Mon, 28 July 2014 05:02 UTC
avatar chikiuso2  is currently offline chikiuso2
Messages: 0
Registered: July 2014
Go to all my models
Junior Member
Hello, is there a PHP sample shop source code? I would like to start building something with it, thanks.
 Topic: Email based alternative to API
Email based alternative to API [message #94537] Tue, 22 July 2014 17:39 UTC
avatar eXtrudy  is currently offline eXtrudy
Messages: 0
Registered: June 2013
Go to all my models
Junior Member
Hi,

to be honest - the API seems a little bit too complicated for using it in small, non-commercial software projects. It would be much easier just to send a mail from the user's mail client to shapeways, which contains the created stl file as attachment and a standard text. Minutes later the user could then receive a reply mail with a link to his uploaded object and then decide if he wants to create an account or sign in if he already has one. No need for consumer keys, developer authentication etc. Of course this wouldn't be an option for business owners, but an interesting alternative for hobby developers.

best regards, Hendrik


www.facebook.com/eXtrudy
 Topic: how to create a shapeways based shop within my website?
how to create a shapeways based shop within my website? [message #93498] Sun, 06 July 2014 15:09 UTC
avatar mknowland  is currently offline mknowland
Messages: 0
Registered: June 2014
Go to my shop
Junior Member
Hi,

I'm new to shapeways, and I want to be able to create my a shop on my business website where people can select and buy the 3d prints the same way they would do if they went directly onto my shop in the shapeways website. Presumably this is what the API business is that people are working on here? I'm not entirely sure.

Is this possible? From what I've seen it looks like it, but where do you start?

Cheers,
Mike

[Updated on: Mon, 07 July 2014 21:33 UTC]

 Topic: Price api currency (Euro vs USD)
Price api currency (Euro vs USD) [message #89207] Tue, 06 May 2014 09:35 UTC
avatar siets  is currently offline siets
Messages: 0
Registered: April 2014
Go to my shop
Junior Member
Hi,

How does the price api determine the currency that is returned? I'm only getting the price in USD, but my primary audience will be interested in the price in euros.

The context of my question is the following:
I'm building a site that can generate a customizable 3d model (using ShapeJS!). When the customer is satisfied with the model, the site will upload it to shapeways as a private model to my store. There the customer can buy the model using a shapeways account.

Prior to uploading the model I'd like to display the price (in Euros and USD).

How can this be done? Or is there a preferred alternative approach?

Thanks!

Sietse.
 Topic: cannot get authentication URL
cannot get authentication URL [message #85992] Sun, 09 March 2014 01:20 UTC
avatar tophercf  is currently offline tophercf
Messages: 0
Registered: February 2014
Go to all my models
Junior Member
Hi Team,

I am a bit stuck using the python wrapper for the shapeways API.

The example documentation shows the following:

client = Client("key","secret")
url = client.connect()


only when I am printing this url out in my logging it is a nonetype. The object is capturing all of the necessary parameters and encoding them, but when the post request is made, it is note successful. Does anyone else have this issue?

My stack is: Python, Google App Engine, and Blobstore. Please let me know if I should add more detail to my question.


Google App Engine Log:
2014-03-08 17:03:42.543

"POST /oauth1/request_token/v1 HTTP/1.1" 401 None

D 2014-03-08 17:03:42.544

Redirect URL:

D 2014-03-08 17:03:42.544

None

D 2014-03-08 17:03:42.545

if Nonetype above, authentication request has failed.

 Topic: Posting model data in C#?
Posting model data in C#? [message #85840] Wed, 05 March 2014 16:27 UTC
avatar paulbird  is currently offline paulbird
Messages: 0
Registered: March 2014
Go to my shop
Junior Member
Hi, I had a look at the github for the C# code.

It has functions for logging in and verifying. (Even though they don't work very well but I modified them). So I think I got that at least.

But I don't see any functions for actually posting any model data? All the functions are GET functions.

What do I need to do to post model data in C sharp?

Do I need to post paramters such as token "oauth_signature" or should they be URL parameters such as:


https://api.shapeways.com/models/v1?oauth_consumer_key=85e3e b8e59f2060cdb6e19ab561&oauth_nonce=s1vzsx0pp
&oauth_signature=9Yk9aRxvpNjunM
&oauth_signature_method=HMACSHA1
&oauth_timestamp=139403
&oauth_token=be5b37605cd1a2ff61cc983f1&oauth_version =1.0a

Do I need to send all these parameters like a form? And if so what about the encoded json data itself? Does this have a parameter name too? I guess "file" and "filename". Even though in the information these are both in the same Json data.

( I presume I have to send some sort of auth_signiture otherewise how will it verify that this is the correct user?)

[Updated on: Wed, 05 March 2014 16:54 UTC]

 Topic: VB.NET
VB.NET [message #84655] Mon, 10 February 2014 12:16 UTC
avatar jjzwaard  is currently offline jjzwaard
Messages: 0
Registered: July 2013
Go to all my models
Junior Member
I am looking for anyone who has experience with the REST API and VB.NET. If you have any examples you can share, please share!


Kind regards,

JJ


 Topic: Get existing shop data?
Get existing shop data? [message #84516] Fri, 07 February 2014 17:55 UTC
avatar berky93  is currently offline berky93
Messages: 0
Registered: August 2009
Go to my shop
Junior Member
Looking at the shop documentation, it seems to be mostly geared towards apps that create content and upload them to Shapeways. My question is, is there a way to get data from an existing shop? For instance, could I somehow retrieve a list of models in my shop, or retrieve the name, prices, photos, etc. of a given model that was uploaded using the standard interface on this website?


Check out my new shop Illogical!
 Topic: Deprecating the SOAP API : April 30th
Deprecating the SOAP API : April 30th [message #84276] Mon, 03 February 2014 16:57 UTC
avatar natalia  is currently offline natalia
Messages: 1
Registered: September 2008
Go to all my models
Junior Member
Hey guys,

In order to continue providing the best possible software tools and service, we are planning to deprecate and discontinue support for our SOAP API, and in the process, migrate existing SOAP applications to use our REST API.

WHAT THIS MEANS FOR YOU:

If you have an active app that connects to the SOAP API framework, we highly recommend you transition it to the newer REST API.

We understand that re-working some of your application's code to interface with our newer API might take some time and wanted to provide an advance notice. We will be deprecating our SOAP functionality on Wed April 30, which is roughly 3 months from now.

In order to make this transition as smooth as possible, our API team will be providing help and assistance with getting your applications transitioned to our REST API. If you have any questions or concerns, please email the team at api@shapeways.com.

We appreciate your patience and your understanding as we move onwards and upwards at Shapeways.

Best,
Natalia

[Updated on: Thu, 24 April 2014 20:56 UTC] by Moderator


Ex-Shapeways Community Manager <3
 Topic: View price without user login
View price without user login [message #80794] Sun, 08 December 2013 19:24 UTC
avatar framp  is currently offline framp
Messages: 0
Registered: December 2013
Go to all my models
Junior Member
Is there a way to access price data without having an user log in?

I'm working on an application which needs shapeways pricing data to calculate how much an object will cost and I don't even have a browser to display my authentication_url.

The ugly way means faking a login of a fake user to get the price, but it's not something I'm willing to do.
Maybe the most important question is: Isn't there an API for non-end-user related activities?
Ideally I think, given an application key and secret, we should be able to access public data such as pricing.

Am I missing something?
Thanks in advance
 Topic: How to add an html description?
How to add an html description? [message #77382] Wed, 23 October 2013 16:43 UTC
avatar UtorCase  is currently offline UtorCase
Messages: 43
Registered: October 2013
Go to my shop
Member
How can I pass html description?
For example
		$data = array("fileName" => "$filename",
			"file" => rawurlencode(base64_encode($file)),
			"title" => "Test",
			"description" => htmlentities("<li>Testing HTML <a href=\"http://list.ly/list/8tK-android-games-that-support-xbox-360-controllerhere\">here</a> a list  that you can edit as well</li></ul>"),
...

Looks like JSON is dying along the way due to the html characters. How about changing this to be base64 encoded so we can pass it in?
The error is "A fatal error occurred during model fetch exception Exception : Invalid auth/bad request (got a 401, expected HTTP/1.1 20X or a redirect)"

I also tried urlencode but then the html shows up as urlencoded...
 Topic: Getting "unknown error" when trying to upload a photo for a model
Getting "unknown error" when trying to upload a photo for a model [message #74696] Thu, 12 September 2013 21:28 UTC
avatar mattermaster  is currently offline mattermaster
Messages: 0
Registered: August 2013
Go to all my models
Junior Member
I'm not really sure why. I used the exact same code that I used to properly encode the image file as I did with the model (which I can successfully upload) except the response is

{u'reason': u'Unknown error', u'result': u'failure'}

I also noticed for models I can't upload binary stl files. They always seem to fail. Since images are always binary, I'm wondering if this is a similar issue
 Topic: Setting defaultMaterialId and uploadScale not working
Setting defaultMaterialId and uploadScale not working [message #73205] Fri, 16 August 2013 23:19 UTC
avatar levlalmanzar  is currently offline levlalmanzar
Messages: 0
Registered: April 2013
Go to all my models
Junior Member
Hello,

$data = array("fileName" => "$filename",
"file" => rawurlencode(base64_encode($file)),
"hasRightsToModel" => 1,
"title" => "testName",
"isPublic" => 0,
"acceptTermsAndConditions" => 1,
"uploadScale" => 0.0254",
"defaultMaterialId" => 26,
);

I am using the php method to upload my models but several of the parameters aren't working. When I print the return JSON it shows that I the defaultMaterialId setting has been set to 26, like I wanted. But when I view the model's JSON file on shapeways it shows that it's set itself back to 6 every time. And the uploadScale isn't taking effect either. I also can't figure out how to correctly set the "materials" parameter. All of the other parameters are setting correctly. Any assistance is appreciated. Thanks.
 Topic: POST models/v1
POST models/v1 [message #70023] Tue, 18 June 2013 11:16 UTC
avatar Rafferty  is currently offline Rafferty
Messages: 0
Registered: February 2012
Go to my shop
Junior Member
Hi,

I'm using the POST modes/v1 API to upload a model.

The API documentation describes values of "price" and "basePrice" returned within the Material elements. However, all I am receiving for each material is {\"materialId\":6,\"markup\":0,\"isActive\":1}

Is there something I need to set to specify to get the price calculation. I am specifying a particular material - but am getting a long list of materials back (including the one I specify)..

Thanks in advance

Rafferty
 Topic: Looking for experienced programmer to design app (webgl, java) for web and mobile
icon6.gif  Looking for experienced programmer to design app (webgl, java) for web and mobile [message #68817] Wed, 29 May 2013 12:13 UTC
avatar oddartlover  is currently offline oddartlover
Messages: 0
Registered: May 2013
Go to my shop
Junior Member
Looking for experienced programmer to design app (webgl, java) for web and mobile. Much like the API design apps you see here, we wish to have a step by step "Real Time" design changes app that is web based and possibly designed also for ipad/iphone/android.

We have been granted a budget for a qualified person/firm that has similar work in their portfolio and can produce quick turn around and work with us on changes as they go.

Please contact me.


Chris 423.316.5571 gohampton@mac.com Tennessee, United States
 Topic: Private models
Private models [message #66085] Sat, 13 April 2013 04:14 UTC
avatar Bathsheba  is currently offline Bathsheba
Messages: 638
Registered: August 2008
Go to my shop
Senior Member
Shapeways Crew
I perceive a change here: http://developers.shapeways.com/docs

Grep it for "secretKey".


-Bathsheba http://bathsheba.com
Pages (2): [1  2    »]

Logo

Hello.

We're sorry to inform you that we no longer support this browser and can't confirm that everything will work as expected. For the best Shapeways experience, please use one of the following browsers:

Click anywhere outside this window to continue.