Search code examples
azurecomputer-visionazure-blob-storageazure-cognitive-servicessas-token

ComputerVision API doesn't allow BlobURL with SAS Token


I'm trying to analyse my images using Azure Computer Vision API (Azure Cognitive Service)

But the issue is my Image is stored in Blob container with Private access which means without a SAS token it will not able to access. So when I tried to call the Computer Vision API with my image URL + SAS .It's giving bad request

You can easily repro this issue in this site too

enter image description here


Solution

  • I gave it a quick try to ensure that this was only a restriction of the web demo on the site you provided.

    I can confirm that images hosted on a blob, accessed through a SAS signature, are working with the API, see below my test where I got a 200 OK and a valid reply content:

    demo

    I also confirm that it is not on the web demo: I guess they are just ensuring that the provided URL string ends with jpg, jpeg, gif, bmp or png