> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/authentication/llms.txt)
> Source: https://docs.saleor.io/api-reference/authentication/mutations/token-refresh

# tokenRefresh Mutation

Refresh JWT token. Mutation tries to take refreshToken from the input. If it fails it will try to take `refreshToken` from the http-only cookie `refreshToken`. `csrfToken` is required when `refreshToken` is provided as a cookie.

```graphql
tokenRefresh(
  csrfToken: String
  refreshToken: String
): RefreshToken
```

Details

```graphql
type RefreshToken {
  token: String
  user: User
  accountErrors: [AccountError!]! @deprecated
  errors: [AccountError!]!
}
```

<a id="arguments"></a>

### Arguments

<a id="csrf-token"></a>

#### [`csrfToken`](#csrf-token) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

CSRF token required to refresh token. This argument is required when `refreshToken` is provided as a cookie.

<a id="refresh-token"></a>

#### [`refreshToken`](#refresh-token) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Refresh token.

<a id="type"></a>

### Type

<a id="refreshtoken"></a>

#### [`RefreshToken`](/api-reference/authentication/objects/refresh-token.md)

Refresh JWT token. Mutation tries to take refreshToken from the input. If it fails it will try to take `refreshToken` from the http-only cookie `refreshToken`. `csrfToken` is required when `refreshToken` is provided as a cookie.
