【问题标题】:Pinterest API - 403 error when requesting access token on Dreamhost serverPinterest API - 在 Dreamhost 服务器上请求访问令牌时出现 403 错误
【发布时间】:2016-02-16 19:44:33
【问题描述】:

我正在使用this php wrapper,使用根据文档生成的链接从 pinterest 成功获取代码:

$loginurl = $pinterest->auth->getLoginUrl($callback_url, array('read_public'));

然后当我运行这个时:

$token = $pinterest->auth->getOAuthToken($_GET['code']);

它在我的本地服务器上运行良好,但是当我尝试在我们的 Dreamhost 服务器上运行它时,我得到:

Pinterest error (code: 403) with message: Forbidden

我查看了error documentation Pinterest 供应品,但在检索 oauth 令牌时找不到与 403 错误相关的任何内容。

在从 Pinterest 的 API 请求 oauth 令牌时,我看到的仅有的两个地方提到了 403 错误,得出的结论是 Pinterest is blocking the ipsthe user agent string

我尝试手动覆盖用户代理字符串,但无济于事。

我已尝试联系 Pinterest 以了解我是否缺少任何东西,他们将我指引到这里。

【问题讨论】:

  • 您找到解决方案了吗?我也面临同样的问题。
  • 很遗憾,没有,我与 Pinterest 的所有沟通都以他们告诉我他们正在处理它而结束,他们会回复我,距离我上次与 Pinterest 沟通已经过去了 3 个月他们。我什至无法通过 curl 请求 Pinterest rss 提要手动从 Pinterest 获取信息。

标签: php api oauth pinterest


【解决方案1】:

确保 Dreamhost 服务器使用的是 HTTPS URL,例如正在使用 TLS。这可能是您得到 403 的原因。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-12
    • 1970-01-01
    • 2019-12-30
    • 2014-02-19
    • 2020-07-25
    • 1970-01-01
    • 2019-06-06
    • 1970-01-01
    相关资源
    最近更新 更多