App reviews, troubleshooting, and recommendations
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Here the code, please suggest to get the products count.
var client = new RestClient("https://xxx.myshopify.com/");
var request = new RestRequest("/admin/api/2023-10/products/count.json", Method.Get);
request.RequestFormat = DataFormat.Json;
request.AddHeader("X-Shopify-Access-Token", "xxxtoaken");
var response = client.ExecuteAsync<string>(request);
var r = JsonConvert.DeserializeObject<dynamic>(response.Result.Content);
var count = r.count;