Sample code for 30+ languages & platforms
Delphi ActiveX

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 Delphi ActiveX Downloads

Delphi ActiveX
uses
    Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
    Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Chilkat_TLB;

...

procedure TForm1.Button1Click(Sender: TObject);
var
http: TChilkatHttp;
jsonStr: WideString;

begin
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

http := TChilkatHttp.Create(Self);

// Use your Shopify store's Admin API key and password.
http.Login := 'admin3_api_key';
http.Password := 'admin3_password';
http.BasicAuth := 1;

jsonStr := http.QuickGetStr('https://mystore.myshopify.com/admin/api/2020-07/products.json');
if (http.LastMethodSuccess <> 1) then
  begin
    Memo1.Lines.Add(http.LastErrorText);
    Exit;
  end;

Memo1.Lines.Add('Response status code: ' + IntToStr(http.LastStatus));
Memo1.Lines.Add('JSON response:');
Memo1.Lines.Add(jsonStr);
end;