(Xojo Plugin) Shopify OAuth2 Authentication: Get List of Products
Demonstrates how to send a simple HTTP GET request with OAuth2 to get a list of products. The OAuth2 access token was obtained from the Shopify developer console for the created custom app.
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Dim http As New Chilkat.Http
http.SetRequestHeader "X-Shopify-Access-Token","admin_api_access_token"
Dim jsonStr As String
jsonStr = http.QuickGetStr("https://mystore.myshopify.com/admin/api/2022-04/products.json")
If (http.LastMethodSuccess <> True) Then
System.DebugLog(http.LastErrorText)
Return
End If
System.DebugLog("Response status code: " + Str(http.LastStatus))
System.DebugLog("JSON response:")
System.DebugLog(jsonStr)
|