1
votes

I have created an Azure function which is trigered when a new file is added to my Blob Storage. This part works well ! BUT, now I would like to start the "Speech-To-Text" Azure service using the API. So I try to create my URI leading to my new blob and then add it to the API call. To do so I created an SAS Token (From Azure Portal) and I add it to my new Blob Path .

https://myblobstorage...../my/new/blob.wav?[SAS Token generated] 

By doing so I get an error which says :

Authentification failed Invalid URI 

What am I missing here ?

N.B : When I generate manually the SAS token from the "Azure Storage Explorer" everything is working well. Plus my token is not expired in my test

Thank you for your help !

1

1 Answers

0
votes

You might generate the SAS token with wrong authentication. Make sure the Object option is checked. enter image description here

Here is the reason in docs:

  • Service (s): Access to service-level APIs (e.g., Get/Set Service Properties, Get Service Stats, List Containers/Queues/Tables/Shares)
  • Container (c): Access to container-level APIs (e.g., Create/Delete Container, Create/Delete Queue, Create/Delete Table, Create/Delete Share, List Blobs/Files and Directories)
  • Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files(e.g. Put Blob, Query Entity, Get Messages, Create File, etc.)