Hi, i’m developing a custom app using Remix Template & Polaris ui.
I use Autocomplete component to quick search & select product.
When i change input value fetcher will load from api/products (routes: api.products.ts) and always return 401 from app-bridge.js.
My custom app just follow the Build document (not config or setting anything else just try to test Autocomplete component).
I’ve tested another action (Add product action follow the example in document):
=> The first product added but the second return 401
Can anybody help, thank u all
This is my code:
@sdcheng Have you checked the access scopes configured in your App’s TOML file?
1 Like
@silverpine
Thanks for your response,
by default scope is scopes = “write_products”, even i can generate the first product but when i click to generate the second one its return 401 error
@sdcheng you may add “read_products” as well, to see any difference.
1 Like
@silverpine I’ved update read_products but the same result, my app currently on localhost with default cloudflare domain (generate and updated by shopify cli) should i deploy to real domain ?
@sdcheng Not necessary. Your app should be fully functional in the development environment. However, once you change an access scope, the app must be reauthorized for the change to take effect, if that hasn’t been done yet.
1 Like
@simply-forms
I’ve restarted and reinstall app to apply new scope, but nothing change.

I think the problem is callingauthenticate.admin(request)for the second time, because the first time when it’s called and the product is created, everything works fine — the 401 error only occurs when it’s executed again.
I’ve checked and compare header for the first and second are the same
@simply-forms @silverpine
Thank you, everyone! The problem was solved after I enabled “Set time and date automatically” in the system date and time settings.