Xbase++
Xbase++
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 Xbase++ Downloads
LOCAL oHttp
LOCAL cJsonStr
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
oHttp := CreateObject("Chilkat.Http")
// Use your Shopify store's Admin API key and password.
oHttp:Login := "admin3_api_key"
oHttp:Password := "admin3_password"
oHttp:BasicAuth := 1
cJsonStr := oHttp:QuickGetStr("https://mystore.myshopify.com/admin/api/2020-07/products.json")
IF (oHttp:LastMethodSuccess != 1)
? oHttp:LastErrorText
oHttp:destroy()
RETURN
ENDIF
? "Response status code: " + Str(oHttp:LastStatus)
? "JSON response:"
? cJsonStr
oHttp:destroy()