# getTokenId

Learn how to get the unique token ID.

This method provides the unique ID of the token. When no ID is set, it returns `null`.

## Signature

This method has the following signature:

```php
public function getTokenId(): ?string
```

This method returns the unique token ID, or `null` when none is set.

## Example

Here is a basic example of how to use this method:

```php
<?php
use Croct\Plug\Croct;

$croct = Croct::fromDotenv();
$token = $croct->getUserToken();

$tokenId = $token->getTokenId();
```
