【问题标题】:POST requests to Bing Webmaster API always gives NotAuthorized对 Bing Webmaster API 的 POST 请求总是给出 NotAuthorized
【发布时间】:2019-04-11 17:21:43
【问题描述】:

我正在尝试通过 HTTP POST 请求以编程方式将站点地图索引文件提交给 Bing。 我按照他们的documentation page 中的 JSON 请求示例进行操作。

这是我试图在 cURL 中提出的请求(我替换了站点 url 和 apikey):

curl -XPOST -H 'Host: ssl.bing.com' -H "Content-type: application/json" -d '{
"siteUrl":"https:\/\/www.example.com",
"feedUrl":"https:\/\/www.example.com\/Sitemaps\/SitemapIndex--stuff--01.xml"
}' 'https://bing.com/webmaster/api.svc/json/SubmitFeed?apikey=MY_KEY'

响应如下所示:

{
    "ErrorCode": 14,
    "Message": "ERROR!!! NotAuthorized"
}

api 密钥是从 Bing webmaster ui portal 生成的。我的用户拥有administrator 权限。添加 Content-Length 标头没有帮助。

GET 请求工作正常,我可以检索提要或交通信息。

在 Bing 网站管理员门户 UI 页面中,我可以毫无问题地提交站点地图文件。

在询问之前我已经在网上搜索过,但找不到任何相关信息。有没有人也遇到过这个问题?可能我遗漏了一些东西,我会很感激一些建议。

【问题讨论】:

  • 遇到同样的问题。你最终弄明白了吗?
  • @stepanian 不。

标签: post seo sitemap bing bing-webmaster-tools


【解决方案1】:

在以下情况下出现此错误:

1 - 网站管理员中已验证的 URL 与您请求中的 siteUrl 不匹配

示例: 站长-https://example.com/ 请求 - https://example.com/home

2 - 您的 urlList 中的 URL 与 siteUrl 模式

不匹配

示例: siteUrl - https://example.com/home/ 网址 - https://example.com/about-us.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-21
    • 1970-01-01
    相关资源
    最近更新 更多