Pinterest's official OAuth2 flow seemingly returns an invalid access token

前端 未结 2 1668
無奈伤痛
無奈伤痛 2021-01-06 12:32

I followed the Pinterest\'s instructions to authenticate a user and after completing step 2 I am holding an access token in my hands. However, when I use this access token t

相关标签:
2条回答
  • 2021-01-06 12:48

    For those of you who are facing the issue when requesting for access_token in the post request include client_secret too in the 2nd step

    https://developers.pinterest.com/docs/api/authentication/

    i.e the post params while requesting this end point https://api.pinterest.com/v1/oauth/token will be:

    grant_type Must be authorization_code

    client_id This is your app ID.

    client_secret This is your app Secret

    code The authorization code passed to your redirect URI

    0 讨论(0)
  • 2021-01-06 12:52

    Zack Argyle from Pinterest just tweeted that they deployed a fix which solves the problem I described: https://twitter.com/zackargyle/status/648602180002312192

    Summing it up:

    • Follow the instructions on https://developers.pinterest.com/docs/api/authentication/
    • Pass the client_secret not in the first but in the second request
    • Use response_type=code in the first request
    0 讨论(0)
提交回复
热议问题