We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi do you have a example of like Uploading Images for a Listing? thank you
The text was updated successfully, but these errors were encountered:
Hi Here Is sample code to upload image in Etsy
const oauth = { consumer_key: 'consumer_key', consumer_secret: 'consumer_secret', token: 'token', token_secret: 'token_secret', }; function uploadImage(listingId, image_path) { const listing_id = listingId; const file = fs.createReadStream(image_path); const req = request.post({ url: https://openapi.etsy.com/v2/listings/${listing_id}/images`,` oauth }, (err, response, body) => { if (err) { console.log(err); } if (response.statusCode === 201) { body = JSON.parse(body); console.log(body.results[0]); } }); const form = req.form(); form.append('image', file); form.append('rank', imageData.productImageID); }
const oauth = {
consumer_key: 'consumer_key',
consumer_secret: 'consumer_secret',
token: 'token',
token_secret: 'token_secret',
};
function uploadImage(listingId, image_path) {
const listing_id = listingId;
const file = fs.createReadStream(image_path);
const req = request.post({
url:
oauth
}, (err, response, body) => {
if (err) {
console.log(err);
}
if (response.statusCode === 201) {
body = JSON.parse(body);
console.log(body.results[0]);
});
const form = req.form();
form.append('image', file);
form.append('rank', imageData.productImageID);
Feel free if you find any difficulty
!! Happy Coding !!
Sorry, something went wrong.
No branches or pull requests
hi
do you have a example of like Uploading Images for a Listing?
thank you
The text was updated successfully, but these errors were encountered: