# 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](https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods/supported-authentication-types/basic-authentication) 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](https://doc.wearepatchworks.com/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance) and chooses to authenticate with token-based authentication, they will see something similar to the example below:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FHIx0yguz95GZUb56pop3%2Ftoken%20auth%20user%20experience.png?alt=media&#x26;token=3ff19c55-a0e3-4b73-842e-7bacfb3906c2" 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="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FyUeeD7d6CvVsvWqlVuhY%2Fairtable.svg?alt=media&#x26;token=7e8ecf49-55b3-4f59-82db-53bd8290d274" alt=""><figcaption><p><a href="../../../../../connectors-and-instances/patchworks-connectors/airtable-prebuilt-connector">Airtable</a></p></figcaption></figure> <figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FzbxM8twbGTFXIyWLQ9Oo%2Feva.svg?alt=media&#x26;token=fe7a06bb-6ec8-42c2-83ba-d46b1faeb08b" alt=""><figcaption><p><a href="../../../../../connectors-and-instances/patchworks-connectors/eva-prebuilt-connector">Eva</a></p></figcaption></figure> <figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FthphTvOR5ne1uMDThAkN%2Fhubspot.svg?alt=media&#x26;token=f23840a1-75df-4887-83af-94cd4568bd8c" alt=""><figcaption><p><a href="../../../../../connectors-and-instances/patchworks-connectors/hubspot-prebuilt-connector">Hubspot</a></p></figcaption></figure> <figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FZ3snkTYzSwdfY0OSeTx3%2Fodoo2.svg?alt=media&#x26;token=d595997c-e1d0-4cf3-8718-d92d725d0fe6" alt=""><figcaption><p><a href="../../../../../connectors-and-instances/patchworks-connectors/odoo-prebuilt-connector">Odoo</a></p></figcaption></figure> <figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fm1CTJOzDDCC60gkBdaRy%2Fshopify2.svg?alt=media&#x26;token=6576ee77-1607-4862-b44b-7f595e1bdf19" alt=""><figcaption><p><a href="../../../../../connectors-and-instances/patchworks-connectors/shopify-prebuilt-connector">Shopify</a></p></figcaption></figure></div>

You can install any of these for comparison.

## Related information

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