# Integrating with Planhat

[Prerequisites](#prerequisites)

[Planhat Setup](#planhat-setup)\
&#x20;  [ Step 1: Create a service account](#step-1-create-a-service-account)\
&#x20;   [Step 2: Generate API access token](#step-2-generate-api-access-token)

## Prerequisites

To connect Planhat to Drivetrain, you need:

1. An active Planhat account with admin privileges.
2. Service Account for token generation.

## Planhat Setup <a href="#planhat-setup" id="planhat-setup"></a>

Drivetrain connects to Planhat using an API access token generated in Planhat for this integration. To setup this integration, you need to login into your Planhat account and create a service account, assign relevant permissions to access Planhat objects, and share the API token with us. This guide covers the above-mentioned steps in detail below.

### Step 1: Create a Service Account <a href="#step-1-create-a-service-account" id="step-1-create-a-service-account"></a>

1. Login into your Planhat account, hover your mouse on your avatar (intials or photo) in the bottom right of your Planhat tenant and click “**Service Accounts**”.
2. Click on **Add New** to create a new service account, and enter the service account name as “Drivetrain Integration”.

{% hint style="info" %}
A service account is a special account used by the applications to access data within relevant permissions, we strongly suggest creating a new service account for Drivetrain. However, you can continue to use an already-created one as well.
{% endhint %}

3. Select a role or service account to copy permissions from. If none is selected, the service account will have full permissions, which you can modify later.
4. Click on **Save.**

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2FRFIlLY9QJMKMs8GzX0BN%2FPlanhat-1.gif?alt=media&#x26;token=854b3520-df1a-4b32-811f-a916e726b904" alt=""><figcaption></figcaption></figure>

### Step 2: Generate API Access Token <a href="#step-2-generate-api-access-token" id="step-2-generate-api-access-token"></a>

1. If you did not select a role or service account in Step 1, point 3, click on ‘**Permissions**’ under the service account.
2. Assign the relevant permissions here needed for the integration.
3. Click on **Generate New Token.**

{% hint style="info" %}
That’s it share the token with your customer success manager
{% endhint %}
