【问题标题】:Publish to Chrome Webstore using the items.Publish API and cURL使用 items.Publish API 和 cURL 发布到 Chrome Webstore
【发布时间】:2016-05-04 15:04:32
【问题描述】:

我们正在开发 Chrome 扩展程序,作为发布版本的一部分,我们希望将其发布到 Chrome 网上商店进行测试。

我们使用 cURL 来发送 http 请求。

使用以下信息: https://developer.chrome.com/webstore/using_webstore_api 我们已成功更新商店,但在尝试使用 上面链接中的“将项目发布给受信任的测试人员”。

命令行如下所示:

curl -H "授权: Bearer %refresh_token%" -H "x-goog-api-version: 2" -H "Content-Length: 0" -H "publishTarget:trustedTesters" -X POST -v @987654322 @

当我运行它时,我收到一条错误消息,指出不满足发布条件。错误消息指出我们应该设置 publish_to_trusted_testers=true,但我找不到任何文档建议我应该如何或在哪里设置它。

请注意,访问令牌工作正常,上传新扩展的 PUT 命令也成功。

我们将不胜感激地接受任何建议。

乔恩

【问题讨论】:

  • 经过反复试验,我发现请求需要同时具有 publish_to_trusted_testers=true 和 publishTarget=trustedTesters
  • 嗨乔恩,我面临着完全相同的问题。但是在标头中传递两个参数并不能解决它。我还尝试使用 -d 将 publish_to_trusted_testers=true 作为数据传递,但没有成功。我不知道我的电话是否有误,或者是因为我在商店中的商品专用于受信任的测试人员,但具有特定的 Google 群组集。你可以发布你用来使它工作的卷曲吗?谢谢!
  • 好吧,我有一个无效的目标值,最后通过删除“publishTarget”和“Content-Length”标头并使用-H "Content-Type: application/json" -d '{"target":"'$PUBLISH_TARGET'"}'而不使用publish_to_trusted_testers=true来让它工作

标签: google-chrome curl webstore


【解决方案1】:

【讨论】:

    【解决方案2】:

    我尝试了url查询,它成功了:

      curl \
      enter code here-H "Authorization: Bearer $ACCESS_TOKEN"  \
      -H "x-goog-api-version: 2" \
      -H "Content-Length: 0" \
      -X POST \
      -v \
      https://www.googleapis.com/chromewebstore/v1.1/items/$APP_ID/publish?publishTarget=trustedTesters
    

    【讨论】:

      猜你喜欢
      • 2018-03-15
      • 1970-01-01
      • 2018-06-17
      • 2015-04-07
      • 2013-09-09
      • 1970-01-01
      • 2013-03-14
      • 2018-02-12
      • 2015-10-28
      相关资源
      最近更新 更多