我们正在开发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命令也是成功的。
任何建议都会被感激地接受。
乔恩
我尝试了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