使用items.Publish API和cURL发布到Chrome Webstore

问题描述 投票:2回答:2

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

我们使用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 https://www.googleapis.com/chromewebstore/v1.1/items/%app_id%/publish

当我运行这个时,我得到一个错误,说明不满足发布条件。错误消息指出我们应该设置publish_to_trusted_testers = true,但是我找不到建议我应该如何设置它的文档。

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

任何建议都会被感激地接受。

乔恩

google-chrome curl webstore
2个回答
1
投票

https://developer.chrome.com/webstore/webstore_api/items/publish#parameters

关于https://developer.chrome.com/webstore/using_webstore_api的文档目前没有指出api的正确使用,但是发布文档是正确的。


1
投票

我尝试了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
© www.soinside.com 2019 - 2024. All rights reserved.