# Authentication

## Introduction

The `authentication` tab for an endpoint is where you decide which of your [defined authentication methods](/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods/authentication-method-options.md) for this connector can be used for this endpoint:

<div align="left"><figure><img src="/files/RgObBxm5m3RcySL3TtBS" alt=""><figcaption></figcaption></figure></div>

When an authentication method is activated for an endpoint, it means that the endpoint will be available in [process flows](/product-documentation/process-flows/about-process-flows.md) when:

* You [add a connection shape to a process flow](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md)

&#x20;     AND

* You [associate that connection with an instance of this connector](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md) &#x20;

&#x20;     AND

* That instance was [originally configured using this authentication method](/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance.md)

## How does this work?

When you [add an instance](/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance.md) for a connector, you must provide credentials for authentication. Any [authentication methods that you have configured](/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods/authentication-method-options.md) for the connector will be available for selection.&#x20;

So, if you have configured two authentication methods and added an instance for each, and you want your endpoint to be available whichever instance a user chooses to use in a **process flow**, you need to activate both of these for your endpoint.

For example, suppose that:

* You've configured `basic auth` and `OAuth 2` authentication methods for your connector, and have added `instance 1` with `basic auth` credentials and `instance 2` using `OAuth` credentials.
* You add an 'orders' endpoint, but you ONLY activate the `basic auth` authentication metho&#x64;**.**&#x20;

The effect will be:

* If you add a connection shape to a process flow and associate it with `instance 1` (i.e. using `basic auth`), the 'orders' endpoint will be available for selection - this is because we've activated `basic auth` for the endpoint.
* If you [add a connection shape to a process flow](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md) and associate it with `instance 2` (i.e. using `OAuth 2`), the 'orders' endpoint will NOT be available for selection - this is because we didn't activate `OAuth 2` for the endpoint, but the instance is authenticated using `OAuth 2` credentials.

{% hint style="info" %}
It's not mandatory to activate all your configured authentication methods for an endpoint. For example, you might have some endpoints that are fine to use `basic auth`, but others which need the extra security provided by `OAuth 2`.
{% endhint %}

## Activating an authentication method for an endpoint

To activate an authentication method for an endpoint, just set the appropriate toggle option to 'on' - for example:

<div align="left"><figure><img src="/files/vHD2T44MVPYh6NNZ8ryr" alt=""><figcaption></figcaption></figure></div>


---

# Agent Instructions: 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:

```
GET https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
