oauth - Pinterest API returns expired token? -
oauth - Pinterest API returns expired token? -
i'm trying create pinterest application next normal oauth2 procedures. maintain receiving invalid access token.
note parameter "expires_at=2592000" in redirect url after authorizing app:
https://www.pinterest.com/oauth/?consumer_id=1438601&response_type=token
i tried:
https://www.pinterest.com/oauth/?consumer_id=1438601&response_type=code
and exchanging code received above access token:
curl -x set https://api.pinterest.com/v3/oauth/code_exchange/ -d "access_token={access token}&consumer_id=1438601&consumer_secret={secret}&redirect_uri={redirect uri}&code=b78adaa006c35c5ad2c7680c4891bb6ff2da2aa0&grant_type=authorization_code"
returns:
{ "status": "success", "code": 0, "host": "ngapi2-a41ad0f6", "generated_at": "fri, 20 jun 2014 06:59:57 +0000", "message": "ok", "data": { "access_token": "mtqzodywmto1mzk1mtcznjc3njg1otmxmtc6mty0mjh8mtqwmzi0nzu5nzoyntkymdawls1iyzqzywviogiwzjzly2uwzdq4zmmyywq0nju1zdlizq==", "expires_at": 2592000, "consumer_id": 1438601, "token_type": "bearer", "authorized": true, "scope": "bulk_pins,create_boards,create_pins,get_boards" } }
again token expired @ 2592000 (some time in 1970).
i've tried same thing pinterest iphone app , returns valid token:
https://www.pinterest.com/oauth/?consumer_id=1431594&response_type=token
any help appreciated. thanks.
oauth oauth-2.0 pinterest
Comments
Post a Comment