Categories: google-chrome, curl, webstore

Publish to Chrome Webstore using the items.Publish API and cURL

2 answers

We are developing a Chrome Extension and, as part of the release build, we want to publish it to the Chrome Webstore for testing.

We are using cURL to send the http requests.

Using the information in : https://developer.chrome.com/webstore/using_webstore_api we have successfully updated the store, but I am seeing an odd error when trying to publish it using the information in "Publishing an item to trusted testers" in the above link.

The command line looks like this as suggested in the link above:

curl -H "Authorization: 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

When I run this I get an error back stating that the publish condition is not met. The error message states that we should set publish_to_trusted_testers=true, but I can find no documentation suggesting how or where I should set this.

Note that access tokens are working OK, and the PUT command to upload the new extension is also successful.

Any advice would be gratefully accepted.

Jon

All answers to this question, which has the identifier 37031561

The best answer:

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

The docs on https://developer.chrome.com/webstore/using_webstore_api don't currently point to the correct use of the api, but the publish docs are correct.

I tried url query and it succeeded:

  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 

Last questions

how do i remove the switch on my home screen?
how to edit the JS date and time to update atuomatically?
How to utilize data stored in a multidimensional array
Powermockito not mocking URL constructor in URI.toURL() method
Android Bluetooth LE Scanner only scans when phone's Location is turned on in some devices
docker wordpress container can't connect to mysql container
How can I declare a number in java that is more than 64-bits? [duplicate]
Optaplanner solutionClass entityCollectionProperty should never return null error when simple JSON object passed to controller
Anylogic, get the time a pedestrain is in a queue
How do I fix this syntax issue with my .flex file?
Optimizing query in PHP
How to find the highest number of a column and print two columns of that row in R?
Ideas on “Error: Type com.google.firebase.iid.zzav is referenced as an interface from com.google.firebase.messaging.zzd”?
JCIFS SmbFile.exists() and SmbFile.isDirectory() return false when it exists and I can listFiles()
PHP total order
Laravel booking system design
neural net - undefined column selected
How to indicate y axis does not start from 0 in ggplot?
Fragments in backStack
Spinner how to change the data