400 Error Bad Request in update extension bits product

while i am trying to send a put request like this Reference | Twitch Developers tutorials,but failed.it returned a {“error”:“Bad Request”,“status”:400,“message”:“Missing required parameter “sku””}
my code ====
function sendUpdateBits(){
var url = “https://api.twitch.tv/helix/bits/extensions”;

var xhr = new XMLHttpRequest();
xhr.open("PUT", url);

xhr.setRequestHeader("Authorization", 'Extension ' + helixToken);//helixToken by onAuth function
xhr.setRequestHeader("Client-Id", clientId);//get clientId by onAuth function
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
var item = {
    "sku": sku,//i will get sku by bits.getProducts() function
    "cost": {
      "amount": 990,
      "type": "bits"
    "display_name": "Rusty Crate 2",


You shouldn’t be using the token from onAuthorized, the documentation states App Access Token associated with the Extension client ID. You should perform this request on your EBS using the Extensions App Access Token, not an Extension client.

To put it another way:

The broadcaster (or any extension user) doesn’t have authority to update/manage bits products, only the developer does using the Extension ID and Extension CLIENT Secret

thanks a lot. i should use app access token associated with the extension client ID, and client secret,not the extension client.
use ‘bearer’ + access_token