Get API key and secret key via Shopify API? - api

I'm a beginner Shopify developer. I would like to create my application for Shopify store (not private). I want to show api_key and secret_key after installation plugin by merchant. I viewed a lot of tutorials and all of them looks like get this values from nothing. That's why I want to know the answer on 1 question:
1) Is it possible to retrieve from Shopify API api_key and secret_key for application?
I'll be very appreciate, if someone helps me with this issue.

You cannot retrieve your App's App key and Secret through a Shopify API call.
Those keys are used for authorizing your app to be able to gain API access on a particular shop. They are something particular to your app and you don't need an API call for it.
You can find those keys on your App listing on your Shopify Partner account.
This is confirmed by the Shopify API documentation where it doesn't mention you can do this.

Related

Shopify API Configuration

When we created a API, I figured that I need to configure a new Shopify like this
const Shopify = require('shopify-api-node');
const shopify = new Shopify({
shopName: 'your-shop-name',
apiKey: 'your-api-key',
});
Is there any way to get the Shopify "your-shop-name" programmatically? So If I installed the app on another one it won't need to change. Or is there any other way to configure the API on Shopify?
I primarily need to update the product description using Admin REST API.
In your store, where you want to change descriptions using API calls, use the Admin App section to issue yourself an API key pair. You can give that key pair permission to edit products. And you're done! You have the store name obviously, and you have your access token. Nothing to it!

Connect API to Shopify

I have searched for tons of threads here in Stack Overflow but I can't seem to find the fitting or direct answers.
So we would like to fetch products from API of external (outside Shopify) source then upload them to Shopify. Is there a way to do this without creating an app? This external source API provides already data in Shopify format.
Thanks!
In the Shopify store you wish to add these products to, you can create an access token with permission to create products. Using that token, you are free to make API calls to the Shopify store, with the data representing products, to create products in the Shopify store. Very simple pattern. Takes about 30 seconds of your time to create the access token in the Shopify store admin.
No you have to create APP for it.
As per latest updates from Shopify, you need to create "Custom App" atleast to get the Access Tokens and API keys, because Shopify has depreciated "Private apps" They work like Private apps, as those apps are specific to only one store, but these apps can give you all the needed permission to Create and Fetch Products.
You can create new apps from admin panel here: [YourStoreDomain]/admin/settings/apps/development
Documentations realated to it is: https://help.shopify.com/en/manual/apps/custom-apps
From Shopify: https://help.shopify.com/en/manual/apps/private-apps
Note Private apps are deprecated and can't be created as of January
2022. Ask your app developer to create a custom app. Like private apps, custom apps are built exclusively for your shop, but they don't
require open API access to your store or access to your Shopify admin.

How can I send request from Shopify to an external API?

I'm trying to make an integration between Shopify and an external bank API.
The integration is simple, is just request a JWT in the bank endpoint, sending data, and receive a response. My problem is that I have never used Shopify, and I'm not sure if it has a backend to make all this process and how does it works or where could I find it. I search in Google but I didn't found a clear answer for this.
Can anybody help me? Thanks a lot.
you have multiple ways to do this, all depends what you need.
search on settings / payment methods if this bank has already a connection with shopify
Search on shopify apps store if already exist a shopify app for this bank.
If don't exists you can do your own app. there you have two options public or custom apps
If I was you I'll do a public app because I can sell to more shopify customers interested on use the same bank, you can even sell the app to the bank itself on the future.
You should follow the directives from shopify dev

how to access shopify Products via API without api-key and password?

i want to develop a chrome extension to see stats for any store which develop in shopify, can i access any store products without API-Key and Password in shopify?
No, you cant access products json without using api-key or permanent token of the store.
But still you want to access the product details you atleast needs the handler of the product.
Lets say your store is "abc.myshopify.com" and handler of your product is "xyz", then you can product json of xyz by HTTP GET call in following url
https://www.abc.myshopify.com/products/xyz.json
in general
https://www.[storename]/products/[product-handle].json
You could try using the Shopify StoreFront API.
It allows to get information of your shop from from your own website or custom app. Although it doesn't need a API Password, it needs a Api Key that doesn't need to be a secret.
The documentation says this (the first point is the important):
Using the Storefront API, you can:
Fetch data about a single product or a collection of products to
display on any website or device.
Create unique checkout experiences
with full control over the shopping cart.
Create new customers or
modify existing ones, including address information.
Allow customers
to select unique product options.
There is no way shopify will provide store details (product list) without api authentication.
For your requirement, I would suggest to create a shopify app which will sync all product details to your storage and you can access data from there.

How to let my customers login to Shopify via third-party account (without Multipass)

I want my customers to be able to login to my Shopify store via my existing website account system.
This means that if they've already entered their address on my website, they don't need to enter it again in Shopify. (And if I can also track my users' shopping behaviour that would be a bonus.)
I found this related discussion on the Shopify forums (about Facebook login), but with no clear answer:
https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/login-with-facebook-114126
Is it possible to use oAuth (or some other method) to enable this kind of functionality in Shopify?
The official Shopify method to login to your store from your third-party website is to use Multipass, however this requires a Shopify Plus account (starting at $995/month).
Shopify does provide some support for oAuth, however it appears to be mainly used for shop-owners adding third-party apps into their stores, not for creating customer accounts.
There are various apps available for social login functionality. While these won't exactly provide the functionality you need, they must have a found a way of creating new user accounts, so perhaps they can hint at a possible solution for this.
See https://apps.shopify.com/search/query?utf8=%E2%9C%93&q=log+in