Search code examples
azureazure-cognitive-servicesface-api

Azure face api return the same face id even the image changed


It seems that the api will store the image url and return the same face id even the actual image in the url changed. Is there any ways to force the api to redo the identification process and return a new face id?


Solution

  • It turns out that the url parser (express.js deploy as firebase functions) will break the original url (https://xxx/xxx?alt=media&token=xxx) into two parts. In req.query there will be 2 keys: url (which ends at alt=media) and token, so I have to manually combine it back as req.query.url + '&token=' + req.query.token