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

Forum: Shapeways API
 Topic: Oauth question
Oauth question [message #68518] Wed, 22 May 2013 22:36 UTC
avatar timcastelijn  is currently offline timcastelijn
Messages: 2
Registered: March 2012
Go to my shop
Junior Member
Hi Everyone,

I want to login to my account to make a browser based modeling tool and uploader. I have some trouble though getting an acces token.

if i fill in my credentials in the consumer_key.php, I can:

1. open <mypage>//php-curl/AuthorizeWithRequestUriQuery-oauth1-curl.php see file here

2. i get the following reply:
Quote:

[..]Received a temporary request token : Request token : 75406c2b982364998f8a5fad61c5f14255c49a0e Request token secret : 5370ace36d71227d32f03721c9a0f6646a2d5067 Next please authenticate yourself at http://api.shapeways.com/login?oauth_token=75406c2b982364998 f8a5fad61c5f14255c49a0e and collect the PIN for the next step. Fatal error: Call to undefined function readline() in /customers/1/7/f/timcastelijn.nl/httpd.www/savetoweb/2013052 2/php-curl/AuthorizeWithRequestUriQuery-oauth1-curl.php on line 92


3. i can now go to
http://api.shapeways.com/login?oauth_token=75406c2b982364998 f8a5fad61c5f14255c49a0e
where after I log in i get a verification code

What do I do with this verification code to proceed?

4. if I enter it in the AuthorizeWithRequestUriQuery-oauth1-curl.php as $pin I get in return
Quote:

Acces token: Acces token secret:
(i.e. null values).

5. another try was to authenticate with <mypage>php-pecl/Authorize-oauth1-pecl.php, but then i immediatley get
Quote:

Fatal error: Class 'Oauth' not found in <mypage>php-pecl/Authorize-oauth1-pecl.php on line 11



Can anyone help me with this?

best regards,
Tim



 Topic: Private models
Private models [message #66085] Sat, 13 April 2013 04:14 UTC
avatar Bathsheba  is currently offline Bathsheba
Messages: 244
Registered: August 2008
Go to my shop
Senior Member
I perceive a change here: http://developers.shapeways.com/docs

Grep it for "secretKey".


-Bathsheba
http://bathsheba.com
 Topic: Misc questions about the API
Misc questions about the API [message #59613] Fri, 04 January 2013 14:43 UTC
avatar subvs  is currently offline subvs
Messages: 1
Registered: February 2011
Go to my shop
Junior Member
Hi,
I have a few miscellaneous questions regarding the Shapeways API, which I'm using to upload models from my mobile app.

- It appears when I upload my model from my app and visit the resulting model's page in Shapeways, the "description" property, "markup", etc. appear fine, but "tags" appears empty. The value I give in my request is the following comma-delimited list:
<tags>egg,easter,painting,magic 3d easter egg painter,subvs,subversus interactive,iphone,ipad</tags>

Is there anything more I need to do to get those tags to show up?

- In a related question, is there a way to specify the "categories", "shop section", or preview photo through the API? Will there be a way?

- Is there a recommended way to construct the URL given the model's ID? I've noticed sometimes the following format results in a "Redirect Loop":
http://www.shapeways.com/model/846755/

The following format seems more reliable:
http://www.shapeways.com/model/846755/.html

Is there a format we should adhere to that will be guaranteed to always work?

- Is it possible to ask submitModel to send its response after the model has been processed? Directing our users to a URL that says "Rendering Image..." in place of the preview image is confusing. Currently I just wait 30 seconds after receiving the model ID before directing them to the URL, but I was hoping there's a better way.

- What is the meaning of properties such as specular_color, shininess, opacity, translucency, etc on MaterialArray? I understand these concepts in the context of 3D computer graphics but with real-world objects and light sources, how can these properties affect appearance?

Thanks!

[Updated on: Sat, 05 January 2013 14:15 UTC]

 Topic: getModelPrice
getModelPrice [message #59013] Fri, 21 December 2012 11:22 UTC
avatar mfussi  is currently offline mfussi
Messages: 1
Registered: January 2011
Go to my shop
Junior Member
Hi there,

i am trying to implement the getModelPrice Method, but my request always only returns 0 USD. I also tried your provided demo implementation, which also does not return any valid prices.

Are there any changes made to this method, or am I using it wrong? I'm submitting the volume in cm³ and the correspondig material ID, which is appropriate referred to the API documentation.

Greetings Markus
 Topic: Product appears as not for sale even though it is for sale :o
Product appears as not for sale even though it is for sale :o [message #45958] Sun, 25 March 2012 16:15 UTC
avatar eSculpt  is currently offline eSculpt
Messages: 38
Registered: August 2011
Go to my shop
Member
Hey guys. As the topic states, one my items appears as not for sale even though it is for sale. This since the site ui changes I think, but honestly I'm not quite sure when it started.

Any way to fix this?

edit: hmm actually it just shows as not for sale in "my models" page... seems ok elsewhere

[Updated on: Sun, 25 March 2012 16:17 UTC]


esculpt.co.za

Eric Solomon
eric@eSculpt.co.za
 Topic: WSDL 2 JAVA compilation error
WSDL 2 JAVA compilation error [message #41677] Wed, 11 January 2012 11:17 UTC
avatar aditya  is currently offline aditya
Messages: 1
Registered: January 2012
Go to all my models
Junior Member
Hi
I am trying to generate Java classes for given wsdl at http://api.shapeways.com/v1/wsdl.php
However, the compilation tools are giving me syntax errors with the wsdl.
Details below
~/jboss/bin/wsconsume.sh -k http://api.shapeways.com/v1/wsdl.php
Could not find log4j.xml configuration, logging to console.

Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -compile -exsh false -d /home/dasher/Sunglass/temp/output -verbose -classdir /home/dasher/Sunglass/temp/output -allowElementReferences http://api.shapeways.com/v1/wsdl.php
wsdl2java - Apache CXF 2.4.1

Failed to invoke WSDLToJava
org.apache.cxf.tools.common.ToolException: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : http://api.shapeways.com/v1/wsdl.php
Caused by : WSDLException (at /definitions/message[1]/part[2]): faultCode=INVALID_WSDL: Encountered illegal extension attribute 'nillable'. Extension attributes must be in a namespace other than WSDL's. 
	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:291)
	at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
	at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
	at org.jboss.wsf.stack.cxf.tools.CXFConsumerImpl.consume(CXFConsumerImpl.java:250)
	at org.jboss.ws.tools.cmd.WSConsume.importServices(WSConsume.java:279)
	at org.jboss.ws.tools.cmd.WSConsume.mainInternal(WSConsume.java:104)
	at org.jboss.ws.tools.cmd.WSConsume.main(WSConsume.java:92)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.modules.Module.run(Module.java:270)
	at org.jboss.modules.Main.main(Main.java:313)
Caused by: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : http://api.shapeways.com/v1/wsdl.php
Caused by : WSDLException (at /definitions/message[1]/part[2]): faultCode=INVALID_WSDL: Encountered illegal extension attribute 'nillable'. Extension attributes must be in a namespace other than WSDL's. 
	at org.apache.cxf.wsdl11.WSDLDefinitionBuilder.parseWSDL(WSDLDefinitionBuilder.java:97)
	at org.apache.cxf.wsdl11.WSDLDefinitionBuilder.build(WSDLDefinitionBuilder.java:69)
	at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.build(JAXWSDefinitionBuilder.java:84)
	at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.build(JAXWSDefinitionBuilder.java:61)
	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:171)
	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:138)
	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:283)
	... 12 more
Caused by: javax.wsdl.WSDLException: WSDLException (at /definitions/message[1]/part[2]): faultCode=INVALID_WSDL: Encountered illegal extension attribute 'nillable'. Extension attributes must be in a namespace other than WSDL's.
	at com.ibm.wsdl.xml.WSDLReaderImpl.parseExtensibilityAttributes(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.parsePart(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.parseMessage(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
	at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:237)
	at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186)
	at org.apache.cxf.wsdl11.WSDLDefinitionBuilder.parseWSDL(WSDLDefinitionBuilder.java:78)
	... 18 more
 Topic: Possible Interface for mass changes
Possible Interface for mass changes [message #38066] Sun, 06 November 2011 16:17 UTC
avatar woody64  is currently offline woody64
Messages: 304
Registered: November 2008
Go to my shop
Senior Member
That worked for me to reset a model state:

http://www.shapeways.com/?uri=/udesign/model/saleStatus& model=<your model number>&isPublic=0&forSale=0

1.) Can anybody please check that
2.) Shapeways can you clarify if that interface can be used by experienced designers for our own purpose.

Would allow to generate shop specific interfaces to deal with quick mass changes for our shops.
I.e. materials and pricing which should work similar.

Woody64
 Topic: Security upgrades need on API
Security upgrades need on API [message #36639] Fri, 14 October 2011 15:21 UTC
avatar mctrivia  is currently offline mctrivia
Messages: 808
Registered: September 2010
Go to my shop
Senior Member
I need a way to access any shop through the API without the shops password but only if shops have given me access.

Ideal method: you have a api page where users can check what api's are allowed to access there account. Then I can log in to any account that has checked it using my username and password. Also each API should be restricted in what they can do. I would tell you what I need access to, you would list this on the API access page in bold so people can chose to give access to that or not.

Less ideal but easier to implement. Provide each shop with a 64byte api password. I can sha1 there password with my api code(not my password) and store this in my database and log on using my username and the combined password. In this way if I get hacked the password is only good until my api code is changed, there is no way to get the users api code and they can invalidate my access by changing theres, or if I am found to be unreliable you can shut my access off by deleting mine.

The current method opens up a lot of security risks. I need to store real passwords which means if someone hacks me they have full access to peoples accounts.


Follow me on twitter http://twitter.com/mctrivia or my blog at http://4ddice.blogspot.com/


Current Time: Thu May 23 00:34:43 UTC 2013