NetworkAccessDeniedError: permission to use fetch in checkout ui extension

I have created a Shopify checkout extension.

I cannot hit any API it’s showing permission denied.
But I already added network_access = true to ‘shopify.ui.extension.toml’ file.

> [extensions.capabilities]> api_access = true> network_access = true> block_progress = true>

even from my app setting, I allow network access in checkout UI extension.

The error currently showing :

Uncaught (in promise) NetworkAccessDeniedError: permission to use fetch() must be specified under [capabilities] with flag “network_access = true”; this can be done within your extension’s configuration. View the docs for more information:

Is there anything more needed?

Whats the problem ?

2 Likes

Hi :waving_hand:

I just want to confirm that you restarted your development server after updating the configuration file?

Yes. I restarted so many times after updating toml file.

Same issue if you have fixed this please let me know. Thanks

You should additionally allow network access at the app API access page

I have approved “network access in checkout UI extensions,” but I am still facing the same issue. I’m fed up. Now, I’ll try with metafields.

Note: Retrieving data from metafields during checkout is faster since it won’t introduce an external network call. This allows you to rely on Shopify for the uptime, scaling, and durability of the data storage.

1 Like

That was missing in my case. Fetching stuff from an external backend worked after I set this.
Thanks a lot!

This fails in my case too, even after requesting the network access from the partners dashboard. I’ve tried this many times, this doesn’t seem to work

2 Likes