Rest Api - console error ([Deprecation] Subresource requests whose URLs contain embedded credentials

6 0 0


Hi there,

I am trying to use the rest api to simply get the products of a collection, I want to display the products on a non-shopify website using the image, title, price, product link

so users can click and go to the product page of the store. 


I have created an app in the backend of shopify, and am using the query as below(with proper credentials):




I'm making a js call like below:


    url: 'https://{apikey}:{password}@{hostname}/admin/api/{version}/{collectionid}/products.json',
    jsonp: 'callback',
    dataType: 'jsonp',
    success: function(data) { 


The console error I am getting is: 


[Deprecation] Subresource requests whose URLs contain embedded credentials (e.g. `https://user:pass@host/`) are blocked. See for more details.


I'm wondering what I am doing wrong here, and also if this is the correct api to use for my circumstance, thank you for the help!


- Jordan

Shopify Staff
Shopify Staff
535 105 105

This is an accepted solution.

Hi @jordan-warner-8 


As discussed in your other open thread, you should use the Storefront API. Alternatively, Cart Permalinks or the Buy Button

Vix | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit or the Shopify Web Design and Development Blog