About 658,000 results
Open links in new tab
  1. API Keys | Swagger Docs

    Some APIs use API keys for authorization. An API key is a token that a client provides when making API calls. The key can be sent in the query string: or as a request header: or as a cookie: API keys are supposed to be a secret that only the client and server know.

  2. Swagger UI for API Key Authentication Flow with .NET Core 6

    Feb 21, 2022 · API key authentication will keep a secure line between the API and clients, however, if you wish to have user authentication, go with token-based authentication, aka OAuth2.0. In this article, you will learn how to implement the API Key Authentication to secure the ASP.NET Core Web API by creating a middleware.

  3. API key in header with swashbuckle - Stack Overflow

    May 2, 2016 · I want to do API key based authentication on a WebAPI project with Swashbuckle (swagger for .net). I have configured swashbuckle as below: .EnableSwagger(c => c.ApiKey("apiKey") .Description("API Key Authentication") .Name("X-ApiKey") .In("header"); c.SingleApiVersion("v1", "My API"); }) .EnableSwaggerUi();

  4. Authentication | Swagger Docs

    In the following example, the API calls can be authenticated using either an API key or OAuth 2. The ApiKeyAuth and OAuth2 names refer to the schemes previously defined in securitySchemes. For each scheme, you specify a list of security scopes required for API calls (see below).

  5. How to use 'Authorization: Bearer <token>' in a Swagger Spec

    Important: In this example, API consumers must include the "Bearer" prefix as part of the token value. For example, when using Swagger UI's "Authorize" dialog, you need to enter Bearer your_token instead of just your_token. I don't see how you tell the editor what user and password or Basic token to send so you can get a 200.

  6. API Key Authentication in .NET 6+: Custom Headers, Action

    Jan 26, 2025 · In this article, we’ll break down what API keys are, how they work to protect your API, and how you can set up API Key Authentication in a .NET 6+ API with Swagger. Think of it as...

  7. How do I automatically authorize all endpoints with Swagger UI?

    If you use Swagger UI v.3.13.0 or later, you can use the following methods to authorize the endpoints automatically: To use these methods, the corresponding security schemes must be defined in your API definition. For example: ... securitySchemes: basicAuth: type: http. scheme: basic. api_key: type: apiKey. in: header. name: X-Api-Key. bearerAuth:

  8. Authentication with API key - go-swagger

    Jan 26, 2024 · Specify the following security requirements for all endpoints: so by default, all endpoints use the API key auth.

  9. How to Set Up Security Scheme in Swagger for API Authentication

    May 20, 2024 · In this blog post, we will walk through how to set up a security scheme in Swagger for your ASP.NET Web API, enabling secure authentication using API keys or authentication tokens. This tutorial is based on an example where the authentication is done via a token passed through the HTTP header. Why is this important?

  10. Configuring Swagger in .Net 6 with JWT and API Key Authentication

    Feb 20, 2022 · In Swagger, you can describe how your API is secured by defining one or more security schemes (e.g basic, API key, bearer, oauth2 etc.) and declaring which of those schemes are applicable globally.

  11. Some results have been removed