> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drivly.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# What is Drivly Connect?

> Use Connect to unify all of your automotive data and systems with Drivly APIs

export const CustomTip = ({children}) => <div class="my-4 px-5 py-4 overflow-hidden rounded-xl border border-emerald-500/20 bg-emerald-50/50 dark:border-emerald-500/30 dark:bg-emerald-500/10">
    <div class="flex items-start space-x-3">
      <div class="mt-0.5 w-4">
        <svg width="11" height="14" viewBox="0 0 11 14" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class="text-emerald-600 dark:text-emerald-400/80 w-3.5 h-auto" aria-label="CustomTip">
          <path d="M3.12794 12.4232C3.12794 12.5954 3.1776 12.7634 3.27244 12.907L3.74114 13.6095C3.88471 13.8248 4.21067 14 4.46964 14H6.15606C6.41415 14 6.74017 13.825 6.88373 13.6095L7.3508 12.9073C7.43114 12.7859 7.49705 12.569 7.49705 12.4232L7.50055 11.3513H3.12521L3.12794 12.4232ZM5.31288 0C2.52414 0.00875889 0.5 2.26889 0.5 4.78826C0.5 6.00188 0.949566 7.10829 1.69119 7.95492C2.14321 8.47011 2.84901 9.54727 3.11919 10.4557C3.12005 10.4625 3.12175 10.4698 3.12261 10.4771H7.50342C7.50427 10.4698 7.50598 10.463 7.50684 10.4557C7.77688 9.54727 8.48281 8.47011 8.93484 7.95492C9.67728 7.13181 10.1258 6.02703 10.1258 4.78826C10.1258 2.15486 7.9709 0.000106649 5.31288 0ZM7.94902 7.11267C7.52078 7.60079 6.99082 8.37878 6.6077 9.18794H4.02051C3.63739 8.37878 3.10743 7.60079 2.67947 7.11294C2.11997 6.47551 1.8126 5.63599 1.8126 4.78826C1.8126 3.09829 3.12794 1.31944 5.28827 1.3126C7.2435 1.3126 8.81315 2.88226 8.81315 4.78826C8.81315 5.63599 8.50688 6.47551 7.94902 7.11267ZM4.87534 2.18767C3.66939 2.18767 2.68767 3.16939 2.68767 4.37534C2.68767 4.61719 2.88336 4.81288 3.12521 4.81288C3.36705 4.81288 3.56274 4.61599 3.56274 4.37534C3.56274 3.6515 4.1515 3.06274 4.87534 3.06274C5.11719 3.06274 5.31288 2.86727 5.31288 2.62548C5.31288 2.38369 5.11599 2.18767 4.87534 2.18767Z"></path>
        </svg>
      </div>
      <div class="flex-1 text-sm prose text-wrap text-emerald-900 dark:text-emerald-200">
        {children}
      </div>
    </div>
  </div>;

export const HeroContent = ({children, withGrid}) => <div>
    <div class="not-prose relative bg-gray-50/50 rounded-xl overflow-hidden dark:bg-gray-800/25">
      {withGrid && <div class="absolute grid content-center inset-0 bg-grid-neutral-200/20 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))]" style={{
  backgroundPosition: '10px 10px',
  color: '#070712'
}}></div>}
      <div class="relative rounded-xl overflow-hidden flex justify-center">{children}</div>
      <div class="absolute inset-0 pointer-events-none border border-black/5 rounded-xl dark:border-white/5"></div>
    </div>
  </div>;

<HeroContent withGrid>
  <img class="block" src="https://mintcdn.com/chrisrisner/RWKuBzNyztB4Jver/images/connect/ConnectHero.svg?fit=max&auto=format&n=RWKuBzNyztB4Jver&q=85&s=adfdb6758a0172ec0d42248e6d9718c0" alt="Hero Dark" width="1728" height="855" data-path="images/connect/ConnectHero.svg" />
</HeroContent>

## Introduction to Connect

Drivly Connect allows you to link all of your automotive data and systems to Drivly and enable you to access these systems via the Drivly APIs in three easy steps:

1. Select a data or service provider
2. Sign in
3. Give consent

Drivly Connect manages credential validation, multi-factor authentication, and error handling for each integration that Drivly supports. To experience Connect, check out the [demo](www.connect.driv.ly/).

Connect is the exclusive method for connecting your automotive data and systems in both Development and Production environments and is essential for all Drivly integrations.

<Info>In the Sandbox testing environment, Connect's requirement can be optionally bypassed for testing purposes via `/sandbox/public_token/create`.</Info>

***

## Connect Flow Overview

The Drivly Connect flow starts when a user wants to connect an exsisting data or service provider to their Drivly account. An overview of the process can be found below. To start integrating Drivly Connect make sure you have your `api_key` from your `dashboard`.

Before initialising the link flow, ensure you have generated a `user_id` for the specific user. This should be done when a user signs up to your service and is to be stored alongside your user entry in your database. See for more details on how to create a `user_id`.

1. To launch Drivly Connect, first generate a `link_token` by passing the `user_id` to the `/link/token` endpoint.

2. Pass the `link_token` into the Vital link component to open the link for the user. Please note: the `link_token` is a short-lived one-time use token.

3. Use the `onSuccess`, `onError`, `onExit` callbacks to handle different events on your frontend.

<HeroContent withGrid>
  <img class="block" src="https://mintcdn.com/chrisrisner/RWKuBzNyztB4Jver/images/connect/ConnectFlowOverview.png?fit=max&auto=format&n=RWKuBzNyztB4Jver&q=85&s=3e01f19aa3f6331f33b55f7be7950d90" alt="Hero Dark" width="3354" height="1690" data-path="images/connect/ConnectFlowOverview.png" />
</HeroContent>

***

## Integration & Authentication

Automotive data and service providers have different authentication flows. Some require a username and password, SSO, while others require an email address and password. Drivly supports the following provider types:

* `Google`, `Microsoft`, and `GitHub`
* `OAuth`
* `Email`
* `Email + Password`

The majority of providers are OAuth providers. These providers require a user to be redirected to a third party website to authenticate. Once authenticated, the user is redirected back to the link widget. The Email and Email + Password providers require a user to enter their email address and password into the link widget.

This is then sent to Drivly and used to connect to the provider.

<Info>
  View the full list of supported data and service providers [here](/connect/integrations). Don't see one you need? That's ok! You can recommend them **here**. We're actively adding providers to the Drivly ecosystem so your input is helpful.
</Info>

***

## Connect Customization

You may want to add your own custom branding to your Drivly Connect flow to match your product UI. This is useful for users who have products that work directly with their customer accounts and want to use the Drivly API ecosystem.

<HeroContent>
  <img class="block" src="https://mintcdn.com/chrisrisner/RWKuBzNyztB4Jver/images/connect/CloudLotsConnect.svg?fit=max&auto=format&n=RWKuBzNyztB4Jver&q=85&s=5f07fb74fee515efcd9c71831c2172e1" alt="Hero Dark" width="1728" height="800" data-path="images/connect/CloudLotsConnect.svg" />
</HeroContent>

You can customize parts of the Connect flow, including adding your company logo, the integration select view, the button color, and enable additional features like the Account Select view straight from the Dashboard. You can preview your changes in realtime and then publish them instantly once you're ready to go live. For company logo's we accept `JPG` or `PNG` (1MB max), and for button colors we accept `HEX`, `RGB`, and `HSL` values.

For more details, see how to [Build a Custom Link](/connect/build-a-custom-link).
