What should I do when I get this error on this method => food.find_id_for_barcode ?
food.get.v2 method works perfectly fine.
Response body
{
"error": {
"code": 14,
"message": "Missing scope: scope 'barcode'"
}
}
my code in nodeJS
route.get('/foodBarcode', async (req, res) => {
// FOR FOOD.FIND ID FOR BARCODE API
var optionsBarcode = {
method: "POST",
method: "POST",
headers: { "content-type": "application/json", "Authorization": `Bearer ${sampleToken}` },
form: {
method: "food.find_id_for_barcode",
barcode: `0748927052688`,
'region': 'IN',
},
json: true,
};
request(optionsBarcode, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
res.send(body);
});
});