Use API key authentication in ASP.NET Core

Developers often need to authenticate Web API calls at two levels. You might want to authenticate individual users while making an API call or you might want to authenticate the client that is trying to call an API. The former is can be implemented via a token based scheme and latter can be implemented using what is known an API key authentication.

https://www.binaryintellect.net/articles/74a5ce45-e605-40a8-96ee-ab99868810ee.aspx