How to get current session, access token and shop in node and reat app

FaizaBashir
Shopify Partner
33 0 2

Hello, I created a test shopify react and node app. I have to add script tags so I use this code 

const getScriptTags = await axios.get({shop}/admin/api/2021-04/script_tags.json, {headers: shopifyHeader(token)});
How to get the value of current shop and access token in index.js or middleware? I tried many solutions fro internet but nothing seems to work. I am able to save the shop and access token in database when app is installed but dont know the shop name so that i can get access token based on shop from database. I tried 
const session = await Shopify.Utils.loadCurrentSession({
  'Content-Type': 'application/json',
  "Accept-Encoding": "gzip,deflate,compress"
},{});
but i dnt understand what request and response headers to send. Please help
Replies 0 (0)