Reputation: 6762
I am trying to get authorization code from Pinterest.
I went through the official docs and they stated to make a request this parameters as :
https://api.pinterest.com/oauth/?
response_type=code&
redirect_uri=https://mywebsite.com/connect/pinterest/&
client_id=12345&
scope=read_public,write_public&
state=768uyFys
where I changed
remaining parameters unchanged and I hit the request on postman.
And the response I am getting is :
{
"status": "failure",
"message": "Invalid parameters.",
"code": 1,
"data": "Missing required field 'scope'"
}
How can I do this?
Upvotes: 0
Views: 1006
Reputation: 66
Are you using V5 of the Pinterest API? If yes, your scopes are incorrect. read_public > pins:read
Check the scopes here https://developers.pinterest.com/docs/getting-started/scopes/
When you have an app you want to use the app flow with an access token, but don't want to created the whole flow yourself, just for the access token, you can use this tool online https://frederik.today/codehelper/tools/oauth-access-token-pinterest
Upvotes: 0
Reputation: 628
https://api.pinterest.com/oauth/?
state=1234567890&scope=read_public&client_id={your app
id}&redirect_uri=https://www.google.com&response_type=code
Try this parameter order(state as first,scope,...etc)!! very weird, really!! just cut out the scope and paste it in the end and you'll response saying another field missing and do again and again the same parameter order change until you get the website HTML.
Upvotes: 3