Unable To Get Tokens Via Shapeways Api Php Script

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

  1. josetonyp
    josetonyp Member
    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:

    Using consumer key :
    Consumer Key : X
    Consumer Key secret : Y
    To request a temporary request token.

    array(2) {
    string(49) "authentication_url=http://api.shapeways.com/login"
    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 http://api.shapeways.com/login?oauth_token=726fa5400a33864516f48c19dd1e07216600b3ae and collect the PIN for the next step.

    Pin: c57a6e

    Requesting an access token.
    array(7) {
    string(40) "f83ab75a6f7c86cc986dc7405b59206fec1dfefb"
    string(9) "HMAC-SHA1"
    string(3) "1.0"
    string(40) "726fa5400a33864516f48c19dd1e07216600b3ae"
    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) {
    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.