Fetch Public App Details Using Shopify Storefront API - shopify-app

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.

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

Related

How to get the get API path and parameters of Google play developer API?

I have added a non-renewable subscription for one of my projects. We also started implementing the Google play developer API to get the subscription latest status from the Play Store. For that we have done the below steps as per this blog:
Linked the developer account to a new Google Cloud Project.
Enabled the Google Play Developer API for the Google Cloud Project.
Created a service account and created a key for the service account.
I have below clarifications related to this implementation:
I tried to Grant Access for the following permissions: But the corresponding checkmark is not clickable.
View financial data, orders, and cancellation survey responses
Manage orders and subscriptions
The 3rd step as per the blog is to Authorize an API key, but I didn't get a clear idea of that.
We are going to implement this API on the back end side as a corn job, do we need to generate a JWT token for accessing this API? Is this possible to call without a Token? I found 2 types of implementations from this blog, which one is easy and secure?
"Your application can complete these tasks either by using the Google APIs client library for your language or by directly interacting with the OAuth 2.0 system using HTTP."
From where we get the get API path and other details. I found a similar get API from AppStore like this. Is the play store providing a similar kind of get API?
We need the latest purchase status API and for that what parameters do we need to pass?

Shopify Graphql API - draftOrderCreate redirect to Checkout with Discount Code Field

If you are familiar with Shopify draftOrderCreate API, you know that when retrieving the invoice_url via the graphql mutation, it will redirect you to the checkout page but there will be no DISCOUNT CODE Field, and Shopify docs are clear with this, but upon checking some apps (https://apps.shopify.com/draft-helper) it is possible, but on the said app, you will manually generate the checkout link.
Here's a photo of what that app is doing
I am wondering how do i integrate this automatically via graphql. When checking the Console (Network) it seems like he is only passing the draft order id as payload.
When you create a Draft Order, you can provide a discount. So if you do that, and then send the invoice, the discount should be applied correctly.

Is there a Google Forms API that can be used by 3rd party products?

I am looking to create a personalized form using the user data in my product database.
I have already checked this link - Google Form API?. It talks about automating forms via Google app-scripts. That is not what I am looking for.
I want to programmatically create a Google Form instance from the user data in my product database and then send the form to the user.
The only way provided by Google to programmatically create a Google Form is by using the Google Apps Script Forms service (Class FormApp)

400 error - Instagram API - Fetching media items based on Hashtags in Sandbox mode

I try to fetch photos based on hashtags using Instagram API(Sandbox mode). Using below API
https://api.instagram.com/v1/tags/awesome/media/recent?access_token=<My Access token>
I am getting the error
> {"meta": {"code": 400, "error_type": "OAuthPermissionsException",
> "error_message": "This client has not been approved to access this
> resource."}}
But if I use https://api.instagram.com/v1/users/self/media/recent/?access_token=<My Access Token>
then its returning recent 20 media items.
In my sandbox I have authenticated 1 more user but I am not getting any media items other than mine.
I am following the official documentation of Instagram API.
Please provide your inputs for this behavior.
/tags endpoints requires public_content scope enabled for your app. Without it you will not be able to use this endpoint. To be honest right now it is not possible to submit your app for review if you want to have public_content permission. Old Instagram API accepts apps for review only for basic scope. You should try to switch to Facebook Graph API, but please keep in mind that right now it supports only Instagram Business Accounts.
You can try to filter out media that does not contain the tag you wish in response from /self/media/recent endpoint. I know, not the best solution:/

Downloading existing paypal payments with rest api

I need to download all existing payment information from a paypal account to do some analysis on it, so I set up paypal's ruby rest sdk, which involved creating a new application with its own API keys and whatnot. I can make a successful request with the following:
payment_history = Payment.all( :count => 10 )
However,
payment_history.payments
Is empty.
I'm not sure if this application can only access payments created with it? Can I not get pre-existing payments with the rest api? I would prefer to use ruby, if that's possible, as I would like to keep this all within the simple script I have to analyze similar stripe payments.
Some guidance would be extremely appreciated, as paypal's labrinth of documentation and overlapping APIs have me pretty confused.
You will be able to query only those payments that are made or created with Rest API not the Classic APIs. You can use the Classic Ruby SDKs for the appropriate product to get the Transaction details of the classic APIs

Resources