The issue was due to scope mismatch in the OAuth. It has been resolved by running the shopify app deploy command.