Search code examples
shopify-appshopify-api

Fetch Public App Details Using Shopify Storefront API


I have one scenario where I want to access third-party apps/public apps(shopthru) data using Shopify storefront API.

In my case, I am using shopthru app and I want to fetch data about the created campaign, campaign conditions (like discount for specific walletaddress, or POAP NFT).

I want to know if is it possible to get third party app / public app details using shopify storefront API.

shopthru-campaign


Solution

  • This is not possible. Shopify Apps doesn't integrate and extend Shopify Storefront API. You can try to find out what URL of app is by inspecting iframe, pull out accesstoken from your request and using curl try to extract data but this is very hackish and unstable way.

    Other option would be to contact App Developer and ask him to expose some endpoints.

    If App is changing your store behavior, you can try to fetch data using GraphQL Admin API and find desired details in discounts object:

    https://shopify.dev/apps/discounts/existing

    https://shopify.dev/api/admin-graphql/2022-10/queries/codeDiscountNode