Need to use amazon cloudfront image urls while creating product using api

New Member
2 0 0

I am using api to create product,

I am using amazon cloud front url for product-image

ex.image urls -

https://dgbt80jjluj8r.cloudfront.net/1573204346567.jpg
https://dgbt80jjluj8r.cloudfront.net/1573203775499.jpg
https://dgbt80jjluj8r.cloudfront.net/1573203765308.jpg

 

but product is getting created without image. can anybody help me to solve this issue...

These images have content type image/jpeg

how can I make use of these images as product image while creating product from api

 

source code:

const shopifyAPI = require('shopify-node-api');
const config = {
shop: '------.myshopify.com',
shopify_api_key: '-------',
shopify_shared_secret: '-----',
shopify_scope: 'write_products',
redirect_uri: 'http://localhost:3000/-----',
nonce: ''
};

config.access_token = '--------';

var Shopify = new shopifyAPI(config);

var post_data = {
"product": {
"title": "Geometry texture",
"body_html": "Nice colorful texture, can be used for fabric cloths, bags.",
"images": [
{
"src": "https://dgbt80jjluj8r.cloudfront.net/1573204346567.jpg"
}
],
"variants": [
{
"price": "25.00"
}
]
}
}
Shopify.post('/admin/products.json', post_data, function (err, data, headers) {
console.log(data);
});

 

response is coming with product id, etc. but with images[] and image: null

0 Likes