How to make network call to the app's backend from the checkout ui extension code?

nitinpatel278
Shopify Partner
2 0 1

I've found this https://shopify.dev/apps/purchase-options/app-extensions/authenticate 

but it doesn't work for the new Checkout UI extensions. Any idea what is the way to get the access token for the app backend & make API calls from within the checkout UI extension? 

Founder of Checkout Custom Fields by Akia https://apps.shopify.com/checkout-custom-fields-1
Reply 1 (1)

abhishekthory
Shopify Partner
1 0 1
you can use 
  const sessionToken = useSessionToken();
for getting session token and then you have to put in header for as a Bearer token for request