Skip to navigation

Set up API key auth for an HTTP connector

View as Markdown

Not OAuth. API Key authentication requires you to send an API key with your request. You can do this in two ways: in a header or in a query parameter. To send a bearer token, use a header. If the provider’s docs mention a token URL or a client ID and secret, choose an OAuth 2.0 grant instead.

API key in a header

Your API key will be added to an HTTP Header like this:

curl -X GET "https://api.example.com/data" \
-H "Authorization: Bearer YOUR_API_KEY"

To set this up:

  1. Select Api Key Auth from the Auth Config dropdown.

  2. Choose Header Auth as the Api Key Auth Auth Type.

  3. Fill in these fields:

    Field NameField Value
    Header Auth Key (Optional)The HTTP Header name. Defaults to Authorization
    Header Auth Value Pattern (Optional)A ”% string” format string. Defaults to %s, which sends the API key as is. Enter Bearer %s to send it as in the example above.
    API KeyThe API key inserted over %s. (YOUR_API_KEY above)

Send a bearer token

The Auth Config dropdown has no separate bearer token option. To send Authorization: Bearer <token>, use Header Auth, leave Header Auth Key (Optional) at its default of Authorization, set Header Auth Value Pattern (Optional) to Bearer %s, and enter the token in API Key.

Auth Config set to Api Key Auth with Header Auth selected, Header Auth Key set to Authorization and Header Auth Value Pattern set to Bearer %s.

API key in a query parameter

Your API key will be added as an HTTP query parameter like this:

curl -X GET "https://api.example.com/data?API_Key=YOUR_API_KEY"

To set this up:

  1. Select Api Key Auth from the Auth Config dropdown.

  2. Choose Param Auth as the Api Key Auth Auth Type.

  3. Fill in these fields:

    Field NameField Value
    Param Auth Param NameThe query parameter name associated with your API key. (API_Key above)
    API KeyThe actual API key value itself. (YOUR_API_KEY above)