GET Materials/v1

Discussion in 'Shapeways API' started by Rafferty, Jun 25, 2013.

  1. Rafferty
    Rafferty New Member

    If I try and call

    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
  2. hans_lambermont
    hans_lambermont Shapeways Employee Dev Team
  3. ProfessorBeekums
    ProfessorBeekums New Member
    Sending oauth credentials as URL parameters will cause 401 errors. They need to be sent in the authorization header.
  4. Rafferty
    Rafferty New 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/1.1
    Authorization: OAuth oauth_consumer_key="???",oauth_nonce="???",oauth_signature= "???",oauth_signature_method="HMAC-SHA1",oauth_timestamp= "1372769703",oauth_version="1.0"
    Connection: Keep-Alive

    Thanks in advance

  5. ProfessorBeekums
    ProfessorBeekums New Member
    Are you getting a json error message with the 401? We send those so that you'll know why the 401 was sent.
  6. Rafferty
    Rafferty New Member
    Yeah! Thanks. The clue was in the JSON.