# Token-based authentication

## Introduction

**Token-based** authentication allows users to verify their identity with a third-party server using a **token**. This is a more secure approach than [basic authentication](/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods/supported-authentication-types/basic-authentication.md) because username and password credentials are never passed in API requests.&#x20;

## How it works

Token-based authentication works by authenticating with a token that you already have available - perhaps it was given to you by a third-party application provider, or you have generated a token from the API - it doesn't matter how you obtain the token.

{% hint style="info" %}
If you'd like more detailed information about how **Token** authentication works, there's some great background information on the [Postman website](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/#bearer-token).&#x20;
{% endhint %}

## User experience of token authentication

When a Patchworks user [adds an instance of a connector](/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance.md) and chooses to authenticate with token-based authentication, they will see something similar to the example below:

<figure><img src="/files/6eHgKqPV1uzTk1uvDVy0" alt=""><figcaption></figcaption></figure>

## Token-based authentication examples

It can be useful to compare how existing connectors have been configured for **token-based authentication**. The Patchworks marketplace includes many connectors that are configured to use this authentication type - a few examples are linked below:&#x20;

<div align="left"><figure><img src="/files/9CIVDbZEMYQtSbEakzAQ" alt=""><figcaption><p><a href="/pages/QGdIAn1AdRsPssYZlvsi">Airtable</a></p></figcaption></figure> <figure><img src="/files/NmrIqC57gvaGPhycIbZa" alt=""><figcaption><p><a href="/pages/Nwa2BVVBIurNQESb3Gsr">Eva</a></p></figcaption></figure> <figure><img src="/files/MuU6ee7iEPvtQD3MmnSN" alt=""><figcaption><p><a href="/pages/iOpzsr9XNdtXLdL3ucAM">Hubspot</a></p></figcaption></figure> <figure><img src="/files/xtWuMNrXUVDzboTGmLSE" alt=""><figcaption><p><a href="/pages/3OGOfTdrX8Qv3slfZ02Y">Odoo</a></p></figcaption></figure> <figure><img src="/files/AMRx4Q3e9rexRV2XZipn" alt=""><figcaption><p><a href="/pages/As0JiIzVr2qJuPAeb5U7">Shopify</a></p></figcaption></figure></div>

You can install any of these for comparison.

## Related information

* [Configuring token-based authentication](/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods/supported-authentication-types/token-based-authentication/configuring-token-based-authentication.md)


---

# 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/3-authentication-methods/supported-authentication-types/token-based-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.
