How to do an authenticated API call from an online store to the server

nithinkashyapn
Tourist
5 0 1

Hello everyone,

I'm new to the Shopify App Platform and checking out how to use it and got stuck. Please help out if you know the answer.

 

I am creating an app to show a popup on the store and collect user's email address and display it in an embedded app. I am using the `ScriptTag` to show the modal and can write some code to hit a `POST` API. I read on the community that the API route must be there in my app's `server.js` file from where I can connect to my MongoDB instance to save it. Can you please share how to do it along with some code snippet which shows the same. Also, how do i authenticate the API request to make sure that the request is coming from the submitted modal and not some person hitting it via an API client or script?

 

Any help with the above is welcome.

 

Thanks!

0 Likes
abhisheksingh75
New Member
4 0 0

Hey Man, if you figured it out how to it..please replay here.

0 Likes