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
742 stars 309 forks source link

Api to a single store #1087

Closed Zapnologica closed 1 month ago

Zapnologica commented 1 month 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 1 month 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.