Unable To Get Tokens Via Shapeways Api Php Script

Discussion in 'Shapeways API' started by 1273787_deleted, Aug 23, 2016.

Tags:
  1. Hi There,

    I'm trying to use the official PHP getway script to access the API and get a token for my testing app. I've create a new app and tried to get access to it via API but this is what I got:

    ./AuthorizeWithRequestUriQuery-oauth1-curl.php
    Using consumer key :
    Consumer Key : X
    Consumer Key secret : Y
    To request a temporary request token.

    array(2) {
    ["path"]=>
    string(49) "authentication_url=https://api.shapeways.com/login"
    ["query"]=>
    string(142) "oauth_token=X&oauth_token_secret=Y&oauth_callback_confirmed=true"
    }
    Received a temporary request token :
    Request token : X
    Request token secret : Y

    Next please authenticate yourself at https://api.shapeways.com/login?oauth_token=726fa5400a33864516f48c19dd1e07216600b3ae and collect the PIN for the next step.

    Pin: c57a6e

    Requesting an access token.
    array(7) {
    ["oauth_consumer_key"]=>
    string(40) "f83ab75a6f7c86cc986dc7405b59206fec1dfefb"
    ["oauth_signature_method"]=>
    string(9) "HMAC-SHA1"
    ["oauth_nonce"]=>
    int(1471949144)
    ["oauth_timestamp"]=>
    int(1471949144)
    ["oauth_version"]=>
    string(3) "1.0"
    ["oauth_token"]=>
    string(40) "726fa5400a33864516f48c19dd1e07216600b3ae"
    ["oauth_verifier"]=>
    string(6) "c57a6e"
    }
    string(283) "?oauth_consumer_key=X&oauth_signature_method=HMAC-SHA1&oauth_nonce=1471949144&oauth_timestamp=1471949144&oauth_version=1.0&oauth_token=726fa5400a33864516f48c19dd1e07216600b3ae&oauth_verifier=c57a6e&oauth_signature=NwCfoiwPsIOdjmv0S4ADzemjeOE%3D"
    array(1) {
    ["path"]=>
    string(52) "{"result":"failure","reason":"Authentication Error"}"
    }

    Received an access token :
    Access token :
    Access token secret :

    You can store these access token values in access_token.php for the other scripts to use.​

    Can you help me to find the error? It is also happening with our production account.
     
  2. stonysmith
    stonysmith Well-Known Member Moderator
    adexphem likes this.