# ovok_sdk.auth.access_token

Canonical page: https://docs.ovok.com/python-sdk/reference/auth/access_token

OAuth access tokens and their expiry.

## expires_at_for() [#expires_at_for]

```python
expires_at_for(expires_in_seconds: float, now_ms: int) -> int
```

Return the epoch-millisecond expiry of a token that lives `expires_in_seconds` from `now_ms`.

## AccessToken [#accesstoken]

```python
AccessToken(value: str, expires_at_ms: int)
```

A bearer token and when it expires.

**Attributes**

| Name | Type | Description |
| --- | --- | --- |
| `value` | `str` | The token; never shown in `repr`. |
| `expires_at_ms` | `int` | Expiry in epoch milliseconds. |

### is_stale_at() [#is_stale_at]

```python
is_stale_at(now_ms: int) -> bool
```

Stale a minute early, so a token never expires between the check and the request.
