Sasa
Sasa

Reputation: 15

"Error": "401 - No API Key entered or API key incorrect." on each HTTP Azure function

I get this error below on each azure http function even when I create new default one. "Error": "401 - No API Key entered or API key incorrect." Not sure what is up. Anyone has ideas?

Upvotes: 0

Views: 611

Answers (4)

Sasa
Sasa

Reputation: 15

Update: I deleted functions and created them again and all started working as expected. Thanks again.

Upvotes: 0

Sasa
Sasa

Reputation: 15

Thank you guys. Yes, I was using function authorization and code can be found in URL where I pass some other parameters to azure function. During my testing I found out that when I call any http function , it calls another function where I have that message. Have no idea how that happened as it was working previous day without any issue. I' going to delete that function, try again and see how that works.

Upvotes: 0

Christoph Froeschel
Christoph Froeschel

Reputation: 37

As an addition to Tomasz answer: You can find the official documentation here: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=csharp#api-key-authorization

Upvotes: 0

Tomasz Kaniewski
Tomasz Kaniewski

Reputation: 1195

When your function has "Function" or "Admin" authorization, you have to provide APIkey defined for that function. Just add it as "code" Query parameter to your request.

https://(name).azurewebsites.net/api/(function)?code=(APIKey)

enter image description here

You can also get already created url with code here:

enter image description here

Upvotes: 2

Related Questions