Error on setting value in blob storage

I try on https://6694c8f614b64a0008279967--staging-1.netlify.app/ to use the blob storage inside an API route. Tried also in a netlify function call but got the same error so I guess the issue is the same.

I create the storage with

  const productSitemaps = getStore({
    name: 'categorySitemaps',
    siteID: siteId,
    token: apiToken,
  });

This is working fine as I can call await productSitemaps.list()

As soon as I try use set I get the error:
BlobsInternalError: Netlify Blobs has generated an internal error (401 status code)

Code to set value is e.g. await productSitemaps.set('huhu', 'lalal');
The site name is just to a deployment (branch) related name and not to a “real” site.
So might related to this. But I get there the same error so I’m not sure about it.

My current assumption is that the authentication with the siteId and the ApiToken are not correct, but the error is not clear about that. Can anyone confirm this or have another idea for the error message? Can I connect to a different site or is this not possible at all?

You should not have to set the site ID and token yourself. Does removing that change anything?

Did you solve this issue? I have the same problem

FYI for anyone who lands here I believe this is the issue from the blobs github repo: Using `getStore` outside a function only works in dev, not in production · Issue #175 · netlify/blobs · GitHub