Home » Developers » Shapeways API » GET Materials/v1
Search Search  
Show: Today's Messages    Show Polls    Message Navigator
GET Materials/v1 [message #70448] Tue, 25 June 2013 10:02 UTC Go to next message
avatar Rafferty  is currently offline Rafferty
Messages: 7
Registered: February 2012
Go to my shop
Junior Member
Hi,

If I try and call

http://api.shapeways.com/materials/v1

I get a page of documentation back for the API (which is fine).

How do I actually get some values back?

Do I need to pass my OAuth credentials as URL parameters. If so, what format should the URL take (I've already tried, and got 401 errors).

Thanks in advance
Re: GET Materials/v1 [message #70469 is a reply to message #70448 ] Tue, 25 June 2013 13:20 UTC Go to previous messageGo to next message
avatar hans.lambermont  is currently offline hans.lambermont
Messages: 48
Registered: June 2010
Go to all my models
Member
I work here
Hi Rafferty,

When you access the API without OAuth credentials you connect to the JSON API discovery system.
To get started with the API and OAuth please have a look at http://developers.shapeways.com/getting-started?li=dh_gs

regards,
Hans Lambermont
Re: GET Materials/v1 [message #70476 is a reply to message #70448 ] Tue, 25 June 2013 14:42 UTC Go to previous messageGo to next message
avatar ProfessorBeekums  is currently offline ProfessorBeekums
Messages: 28
Registered: February 2013
Go to my shop
Junior Member
I work here
Sending oauth credentials as URL parameters will cause 401 errors. They need to be sent in the authorization header.
Re: GET Materials/v1 [message #70829 is a reply to message #70476 ] Tue, 02 July 2013 13:04 UTC Go to previous messageGo to next message
avatar Rafferty  is currently offline Rafferty
Messages: 7
Registered: February 2012
Go to my shop
Junior Member
Thanks for your response.

I also get "(401) Unauthorised" when I send the oAuth in the header (that's why I was trying the URL instead). My HTTP request looks something like:


GET http://api.shapeways.com/materials/v1 HTTP/1.1
Authorization: OAuth oauth_consumer_key="???",oauth_nonce="???",oauth_signature= "???",oauth_signature_method="HMAC-SHA1",oauth_timestamp= "1372769703",oauth_version="1.0"
Host: api.shapeways.com
Connection: Keep-Alive


Thanks in advance

Rafferty
Re: GET Materials/v1 [message #70899 is a reply to message #70829 ] Wed, 03 July 2013 15:21 UTC Go to previous messageGo to next message
avatar ProfessorBeekums  is currently offline ProfessorBeekums
Messages: 28
Registered: February 2013
Go to my shop
Junior Member
I work here
Are you getting a json error message with the 401? We send those so that you'll know why the 401 was sent.
Re: GET Materials/v1 [message #71041 is a reply to message #70899 ] Fri, 05 July 2013 15:37 UTC Go to previous message
avatar Rafferty  is currently offline Rafferty
Messages: 7
Registered: February 2012
Go to my shop
Junior Member
Yeah! Thanks. The clue was in the JSON.



 
   
Previous Topic:Ring Creator: Shapeway's app on the API
Next Topic:redirect loop when trying to manage apps

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.