useAppBridge from webpixel api for authentication on the back end

I am making a POST call via fetch to my back-end from webpixel api. I would like to authenticate this call to make sure that it is coming from shopify. As far as I can see, I need to use app-bridge to accomplish this. Is this correct?

The examples I see typically use the app-bridge at the app level so I was not sure if I should do the same from the extension. Do I need to use at the app level or use ApolloClient at the extension’s index.js (basically add the code from Getting started with session token authentication (shopify.dev) to the extension)?

The documentation is not super clear about the details unfortunately so wanted get pointers from the community.

Thanks

2 Likes