> For the complete documentation index, see [llms.txt](https://www.locksmith.guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.locksmith.guide/keys/more/combining-key-conditions.md).

# Combining key conditions

At times, you'll want to permit visitors to access a resource if *several* conditions are met. This can be a method of increasing security: you might, for example, require visitors to arrive at your sale collection via a secret link, *but then* you'll want them to *also* provide their personal passcode.

All of Locksmith's key conditions can be combined with all other key conditions. (For the full list, see [Types of key conditions](https://docs.uselocksmith.com/article/492-types-of-key-conditions).) This is powerful! It means you can start to chain pieces of authorization logic together, to achieve really specific results.

## Setup

To configure a combination key, begin by creating a standard key using whatever your first condition ought to be. Then, use the "Edit" link (shown next to the condition description). Scroll down to "+ Add key condition". Locksmith will prompt you to add a second condition, which you then configure in exactly the same way as the first.

Note that you'll see another "+ Add key condition" link, appearing in the key settings of your second condition. Yes, you may continue chaining conditions as needed – there are no limits here. :)

Using the example from earlier, in which a secret link condition is combined with a passcode condition, here's a demonstration:

<figure><img src="/files/yAhxcu2I8sqQas42G9uc" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.locksmith.guide/keys/more/combining-key-conditions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
