# useBits returning 401 in developer rig

**URL:** <https://discuss.dev.twitch.com/t/usebits-returning-401-in-developer-rig/19341>\
**Category:** Extensions\
**Created:** [January 4, 2019, 1:11am UTC](https://discuss.dev.twitch.com/t/usebits-returning-401-in-developer-rig/19341 "2019-01-04T01:11:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shiptoast](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@shiptoast](https://discuss.dev.twitch.com/u/shiptoast)\
**Post date:** [January 4, 2019, 1:11am UTC](https://discuss.dev.twitch.com/t/usebits-returning-401-in-developer-rig/19341/1 "2019-01-04T01:11:51Z")

</div>

I’m using the developer rig and am receiving a 401 when attempting to test useBits with my product sku. Any idea why this is? I am running the panel as broadcaster, logged in linked, and logged in unlinked. All return 401 when calling useBits.

```
window.Twitch.ext.bits.getProducts().then(function(products) {
  $.each(products, function(){
  	window.Twitch.ext.bits.useBits(this.sku);
  })
});

```

I should add that I am an affiliate.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [January 4, 2019, 9:28am UTC](https://discuss.dev.twitch.com/t/usebits-returning-401-in-developer-rig/19341/2 "2019-01-04T09:28:50Z")

</div>

> [@shiptoast](#):
>
> I should add that I am an affiliate.

Doesn’t matter. The rig doesn’t know

This thread covers testing

> [@Testing Bits in Extensions](https://discuss.dev.twitch.com/t/testing-bits-in-extensions/19161):
>
> We know how important having a high quality monetization experience is for your Twitch Extensions. To help you ship monetized Extensions with a higher degree of confidence, we’re making it easier to test Bits in Extensions on your own channel. Developers can now activate Bits-enabled Extension versions that are in a [testing state](https://dev.twitch.tv/docs/extensions/required-technical-background/#extension-life-cycle) on their own channel without needing Partner or Affiliate status and Bits used in the Extension won’t be deducted from their wallet. Please note that if you are trying …

But if you are in the rig currently I believe you can only use the loopback functions for testing with. Not the live calls.

Also that code is a little nasty, it’ll attempt to poke the transaction dialog for every product you have…
