App reviews, troubleshooting, and recommendations
curl 'https://{{api_key}}:{{api_password}}@{{store_name}}.myshopify.com/admin/api/2023-01/collects.json' \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {{access_token}}' \ -d '{ "collect": {[ "product_id": {{product_id}}, "collection_id": {{collection_id}} ]} }'
<html> <body> <noscript> <a href="https://accounts.shopify.com/oauth/authorize?client_id=xxxxxx&destination_uuid=xxxxx&nonce=xxxx&prompt=merge&redirect_uri=https%3A%2F%2Fxxxxxxx.myshopify.com%2Fadmin%2Fauth%2Fidentity%2Fcallback&response_type=code&scope=email%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly%20openid%20profile%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fbanking.manage%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fmerchant-setup-dashboard.graphql%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshopify-chat.admin.graphql%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fflow.workflows.manage%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Forganization-identity.manage&state=xxxxxx&ui_locales=en&ux=shop">Continue</a> </noscript> <script type="text/javascript" defer> window.location = "https:\/\/accounts.shopify.com\/oauth\/authorize?client_id=xxxxxx\u0026destination_uuid=xxxx\u0026nonce=xxxx\u0026prompt=merge\u0026redirect_uri=https%3A%2F%2Fxxxxxx.myshopify.com%2Fadmin%2Fauth%2Fidentity%2Fcallback\u0026response_type=code\u0026scope=email%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly%20openid%20profile%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fbanking.manage%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fmerchant-setup-dashboard.graphql%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshopify-chat.admin.graphql%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fflow.workflows.manage%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Forganization-identity.manage\u0026state=xxxx\u0026ui_locales=en\u0033xz=shop"; </script> </body> </html>
Hello @HV5150,
I am Gina from flareAI app helping Shopify merchants get $5Million+ in sales from Google Search, on autopilot.
It seems like the API call you are making is redirecting you to the authorization page, which means that the API credentials are not being recognized. Here are a few things to check.
1. Make sure that you are using the correct API version in the API call
In your example, you are using 2023-01. Make sure that this is the correct version for your store. You can check the API version by going to your Shopify admin and clicking on Apps > Manage private apps > your app > API details.
2. Double-check that you have the correct permissions for the API call.
In your case, you need the write_customers and read_customers permissions. You can check the permissions by going to your Shopify admin and clicking on Apps > Manage private apps > your app > Admin API.
3. Ensure that you are passing the correct JSON data in the API call
In your example, the JSON data is not properly formatted. The correct format should be:
{
"collect": {
"product_id": {{product_id}},
"collection_id": {{collection_id}}
}
}
Make sure to remove the square brackets around the product_id and collection_id values.
4. Make sure that you have the correct syntax in your API call. In your example, you have a colon instead of a comma after collect. Change it to a comma:
{
"collect": {
"product_id": {{product_id}},
"collection_id": {{collection_id}}
}
}
If none of these suggestions solve your problem, I recommend reaching out to Shopify's API support team for further assistance. They will be able to help you troubleshoot the issue and identify any errors in your API call.
Gina
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023