# Connect a data source

Introspecting your database requires access to your database. The safest way to connect to your database and analyze the tables, column constraints, foreign keys and more is by attaching your database to Outerbase.

{% hint style="info" %}
Outerbase is a security-first company with SOC2 Type II and HIPAA certifications. Database credentials are securely encrypted and safely stored. For more information [visit our security page](https://www.outerbase.com/security/).
{% endhint %}

## Create an Outerbase account

Visit our [platform website](https://app.outerbase.com) to create an account.

## Add a new Base

Once you are logged into an your account, by default you will be inside one of your workspaces. Whichever workspace you want to add your database, or Base, to make sure you switch to it first.

Now you're ready to [follow our documentation](https://docs.outerbase.com/bases/overview) on how to create a new Base.

## Fetch your API token

To utilize Outerbase features outside of the platform user interface you will need your Base's API key. This key can be revoked at any time and re-generated, and is directly link solely to this particular database.

To find it, follow the steps below:

1. Navigate to the desired base.
2. Navigate to **Base Settings** on the bottom-left side of your screen.
3. Under the _API Key_ section, click 'Generate API Key'.
4. Copy your API key.

Now you're ready to start using the Outerbase connection type provided by the SDK in your application.

<pre class="language-typescript"><code class="lang-typescript"><strong>const connection = new OuterbaseConnection(
</strong>    'YOUR_API_KEY'
<strong>)
</strong></code></pre>
