Skip to main content Skip to complementary content

Defining security for your API

Define a global security scheme to use in all operations of your API.

Procedure

  1. Scroll down to the SECURITY SCHEMES section and click Add.
  2. In the Type drop-down list, select Bearer authentication.
  3. Click Add next to HEADERS.
  4. Enter Authorization in the Name field and toggle the Required button to Yes.
    SECURITY SCHEMES section of the Loans API.
  5. Click Save.
  6. Click the pencil icon in the GLOBAL SECURITY section to set a default security for the whole API.
  7. Clear the No authentication check box and select Bearer authentication.
    GLOBAL SECURITY section.
  8. Click Save.

Results

You have defined a default security scheme for your API. All new operations will automatically include the Authorization header.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!