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

# Token authentication

> How you issue tokens to your drivers and control where they can charge — on your own sites and across roaming networks.

Tokens are how your drivers authenticate to charge, and issuing them is how you grant your fleet access: on your own depot and workplace chargers, and out on roaming networks across the ecosystem. This is where you create tokens, decide how they're billed, and control where they work.

## Overview

A [token](/components/access/tokens) — a charge key in Connect — identifies a driver or vehicle at a charger. When a session starts, the platform recognises the token, authorises the charge, and knows how to bill it, with no need for the driver to enter payment details each time.

As a fleet or mobility operator, you issue tokens to your drivers and they reach two kinds of charger:

<CardGroup cols={2}>
  <Card title="Your own infrastructure (CPO)" icon="plug">
    The depots, workplaces, and sites you operate.
  </Card>

  <Card title="Roaming networks (eMSP)" icon="globe">
    Other operators' chargers across the ecosystem, when a token is enabled for roaming.
  </Card>
</CardGroup>

The [Tokens component](/components/access/tokens) covers what a token is and how billing attaches to it; this page is how you issue and manage them.

## Token types

You choose a type when you issue a token, and it decides how the driver authenticates.

| Type                 | How the driver authenticates                                           |
| -------------------- | ---------------------------------------------------------------------- |
| RFID                 | Taps a physical card or fob at the charger                             |
| Virtual              | Starts the session from Spirii Go or your branded app                  |
| Vehicle (Autocharge) | Plugs in; the charger recognises the vehicle by its VIN or MAC address |

Some chargers also support **Plug & Charge**, a certificate-based method where the vehicle authenticates itself on plug-in. It's enabled on the charger rather than issued as a token type.

<Note>
  Vehicle (Autocharge) works only on Spirii's own network, not over roaming. A driver relying on Autocharge won't be recognised on other operators' chargers.
</Note>

## Issuing tokens

You create and manage tokens in Connect under **Charge Keys**.

<Steps>
  <Step title="Set the billing customer">
    Choose the **billing customer** — the account that owns the token and is invoiced for its sessions. For a fleet, this is typically the fleet itself, so all charging lands on one invoice.
  </Step>

  <Step title="Choose the type and enter its ID">
    Pick RFID, Virtual, or Vehicle, then supply the identifier: an RFID chip's UID, a vehicle's VIN or MAC address, or an autogenerated ID for a virtual key.
  </Step>

  <Step title="Add a unique label">
    Give the token a label that's unique in Connect — an RFID reference like `DK.SPI.0001234`, or a fleet vehicle ID like `EVBUS.0007`. Labels are how you recognise a token later across reports and groups.
  </Step>

  <Step title="Activate and enable roaming">
    Set the token active so it can charge, and enable roaming if your drivers need to charge on other networks. Give it a validity period with a start and an optional end date.
  </Step>
</Steps>

Onboarding a whole fleet at once, you can bulk-upload tokens from a CSV of UIDs and labels, up to 100 per upload, rather than creating them one by one.

## Billing and ownership

Every token has a billing customer who's invoiced monthly for all its sessions — the model that lets a fleet consolidate every driver's charging into a single invoice. Alternatively, a driver can link their own payment card to a physical key in the app, so their sessions are billed to them directly.

When you hand a physical key to a driver, they finish the link themselves: they add the key in Spirii Go or your branded app, attach a payment method (or rely on the company billing you've set up), and activate it. From then on they can charge by tapping the key, without opening the app.

## Where a token works

### On your own sites

At any of your public locations, an active token works straight away. To reserve a depot or workplace for your fleet alone, put its tokens in a **token group** (a charge key group in Connect) and bind that group to the location: only tokens in the group can charge there, and they can do so even when the location isn't public. How that interacts with a location's other settings is covered in [Location access](/capabilities/access/location-access).

### On roaming networks

Enable a token for roaming and it authorises on other operators' chargers across the networks Spirii connects to — the on-the-route half of a fleet's charging. See [Roaming connection](/capabilities/roaming/roaming-connection) for how roaming access is established.

<Note>
  A token only works on roaming networks when it's active, enabled for roaming, and labelled in the recommended `DK.SPI.{customerPrefix}` format. An incorrectly labelled token is a common reason a driver can't charge on another network. See [Roaming connection](/capabilities/roaming/roaming-connection) for the details.
</Note>

## Dependencies & limitations

* **A token needs a billing customer and activation.** It can't charge until it's active and owned by a billing customer.
* **Labels and IDs are unique.** Each token's UID and label must be unique in Connect.
* **Bulk upload is capped.** A CSV upload creates up to 100 tokens at a time.
* **Requiring a token is a charger setting.** Whether a charger demands authentication or lets charging start on plug-in is set on the charge box, not the token.
* **Token groups override location settings.** A token group always grants its members access, ahead of a location's public setting and opening hours — see [Location access](/capabilities/access/location-access).

## Related

<CardGroup cols={2}>
  <Card title="Tokens" icon="key-round" href="/components/access/tokens">
    What a token is, its types, and how billing attaches to it.
  </Card>

  <Card title="Roaming connection" icon="globe" href="/capabilities/roaming/roaming-connection">
    How a token reaches chargers on other networks.
  </Card>

  <Card title="Voucher access" icon="ticket-check" href="/capabilities/access/voucher-access">
    Attach a voucher to a token for access and a set rate at specific locations.
  </Card>

  <Card title="Tokens API" icon="code" href="/api-reference/tokens/create-a-new-token">
    Create and manage tokens programmatically.
  </Card>

  <Card title="Location access" icon="lock" href="/capabilities/access/location-access">
    How tokens, groups, and vouchers decide who can charge at a location.
  </Card>
</CardGroup>
