---
title: "Class TokenExpiredException"
slug: "web-sdk--stylelabs.m.sdk.webclient.http.tokenexpiredexception"
abstract: ""
---
# Class TokenExpiredException

Exception for when the security token has expired.

## Inheritance

object

TokenExpiredException

## Namespace: StylelabsStylelabs.MSdkWebClientHttp

## Assembly: Stylelabs.M.Sdk.WebClient.dll

## Syntax

```csharp
public class TokenExpiredException : Exception
```

## Constructors

### TokenExpiredException(string, string)

Initializes a new instance of the [TokenExpiredException](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.sdk.webclient.http.tokenexpiredexception.html) class.

#### Declaration

```csharp
public TokenExpiredException(string message, string refreshToken)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | message | The message. |
| string | refreshToken | The refresh token. |
