【问题标题】:How to get authorization code from Pinterest如何从 Pinterest 获取授权码
【发布时间】:2020-09-13 16:29:14
【问题描述】:

我正在尝试从 Pinterest 获取授权码。

我查看了the official docs,他们说要请求这个参数:

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

我改变的地方

  • redirect_uri=http://localhost&
  • client_id=to_MyClient_Id&

其余参数不变,我在邮递员上提出了请求。

我得到的回应是:

{
  "status": "failure",
  "message": "Invalid parameters.",
  "code": 1,
  "data": "Missing required field 'scope'"
}

我该怎么做?

【问题讨论】:

    标签: oauth pinterest


    【解决方案1】:
     https://api.pinterest.com/oauth/?
     state=1234567890&scope=read_public&client_id={your app 
     id}&redirect_uri=https://www.google.com&response_type=code
    

    试试这个参数顺序(state as first,scope,...等)!!很奇怪,真的!!只需剪下范围并将其粘贴到最后,您就会回复说缺少另一个字段,然后一次又一次地执行相同的参数顺序更改,直到您获得网站 HTML。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-26
      • 2020-12-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-15
      相关资源
      最近更新 更多