A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi
I am accessing Products data from Shopify with Powershell with the following powershell script. It works really well.
##############
$apikey = "myapikey"
$password = "mypassword"
$uri = "https://rocky-bay-eppic.myshopify.com/admin/api/2022-01/products.json"
$headers = @{"Authorization" = "Basic "+[System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($apikey+":"+$password))}
$jsondata = Invoke-WebRequest -Uri $uri -contentType "application/json" -Method Get -Headers $headers -UseBasicParsing
[string]$json = $jsondata.content
write-host $json
################
But how can I access Shopify Cart data in Powershell? If I simply substitute ‘products’ with ‘cart’ above, I get…
error: The remote server returned an error: (401) Unauthorized.
If cart is managed differently would you be able to let me know please.