# getExpirationTime

Learn how to get the time the token expires.

This method provides the time the token expires, expressed as a Unix timestamp in seconds. When the token does not expire, it returns `null`.

## Signature

This method has the following signature:

```php
public function getExpirationTime(): ?int
```

This method returns the expiration time as a Unix timestamp in seconds, or `null` when the token does not expire.

## Example

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

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

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

$expirationTime = $token->getExpirationTime();
```
