nozzlegear / ShopifySharp

ShopifySharp is a .NET library that helps developers easily authenticate with and manage Shopify stores.
https://nozzlegear.com/shopify-development-handbook
MIT License
764 stars 313 forks source link

Api to a single store #1087

Closed Zapnologica closed 3 months ago

Zapnologica commented 3 months ago

I have a simple question.

If I just want to API into my one single store, do I still have to go and create a whole app. in the partners section?

nozzlegear commented 3 months ago

Hey! No, you don't have to create an app in the partners section if you're only using the API for a single store. You'll create what Shopify calls a "Custom App"†. When you do that, they'll ask you which API permissions you want to grant it. Once created, you'll be given an API key, Secret Key and Access Token. You'll use the Access Token with ShopifySharp to make requests to your store:

var service = new OrderService("your-store.myshopify.com", "your-access-token");
var totalOrders = await service.CountAsync();

To create a Custom App, go to your store's admin settings page, then click Apps on the left -> App and sales channel settings -> The Develop apps button toward the top -> Create an app.

2024-08-05T15-48-12-05-00

†They used to call it a "Private App", which you might still find in ShopifySharp's documentation and some of my older guides.