Pinterest API - Authorisation Code - Error Code '2'

Viewed 1968

We're getting the following error when attempting to get an authentication code when the user is not already logged into Pinterest:

{"status": "failure", "message": "Authentication failed.", "code": 2, "data": null}

Example of url we are using to authenticate:

https://api.pinterest.com/oauth/?client_id=1234567891011121314&redirect_uri=https://www.foobar.com/app/influencers/channels/callback/pinterest&scope=read_relationships,read_public&response_type=code&state=cc0c4fbbf2c5058df1932cb561e4494baaef595a

This URL works fine if the user is already logged into Pinterest, it displays the app confirmation and returns a code as expected. However it responds with an error if the user isn't logged in.

The documentation we are following is here:

https://developers.pinterest.com/docs/api/overview/?

1 Answers
Related