@shopify/shopify-api empty scopes not working

I’ve been given feedback on an app to remove scopes not in use by my app.

This would mean my app requires no scopes, however when I try to pass empty scopes, I receive an OAuth error invalid_scope error.

const shopify = shopifyApi({
  ...otherStuff,
  scopes: [' ']
})

I’ve tried many different methods, setting scope to: undefined, null, , [‘’], [’ ']. None of these work and all repeat the same error.

How can I get around this?

similar issue here:
https://community.shopify.com/c/shopify-apis-and-sdks/request-api-acces-to-the-store-object-only-no-other-scopes/m-p/1043460

Hi @dancargill ,

While the official place for support of the libraries are the public GitHub repositories, eg. [for the Node JS library], the [OAuth Documentation] doesn’t say anything about any of the fields in the exchange that includes the scopes being optional. This suggests that specifying at least one scope is required.

Hope you have a great day