Go
Go
Shopify Basic Authentication: Get List of Products
See more Shopify Examples
Demonstrates how to send a simple HTTP GET request with Basic authentication to get a list of products.Chilkat Go Downloads
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := chilkat.NewHttp()
// Use your Shopify store's Admin API key and password.
http.SetLogin("admin3_api_key")
http.SetPassword("admin3_password")
http.SetBasicAuth(true)
jsonStr := http.QuickGetStr("https://mystore.myshopify.com/admin/api/2020-07/products.json")
if http.LastMethodSuccess() != true {
fmt.Println(http.LastErrorText())
http.DisposeHttp()
return
}
fmt.Println("Response status code: ", http.LastStatus())
fmt.Println("JSON response:")
fmt.Println(*jsonStr)
http.DisposeHttp()