<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CKToolJS",
  "identifier" : "/documentation/CKToolJS/AuthenticationRequiredError",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "CKTool JS"
    ],
    "preciseIdentifier" : "struct/AuthenticationRequiredError"
  },
  "title" : "AuthenticationRequiredError"
}
-->

# AuthenticationRequiredError

An object that represents an error that occurs when authentication information is missing for the current user.

```
dictionary AuthenticationRequiredError {
	Int32 code;
	string message;
	string reason;
	string? detailedMessage;
	string? requestUuid;
	Int32? retryAfterSeconds;
	string redirectUrl;
};
```

## Overview

Some database operations require that users sign in with their Apple ID. The server returns `AuthenticationRequiredError` when the user isn’t signed in or their session has expired.

In JavaScript, this is a plain object with properties as described.

In TypeScript, this type is imported in the following way:

```javascript
import type { AuthenticationRequiredError } from "@apple/cktool.database";
```

## Topics

### Instance Properties

[`attribute Int32 code;`](/documentation/CKToolJS/AuthenticationRequiredError/code)

The HTTP status code for a request error.

[`attribute string? detailedMessage;`](/documentation/CKToolJS/AuthenticationRequiredError/detailedMessage)

A string that contains any additional information about this error.

[`attribute string message;`](/documentation/CKToolJS/AuthenticationRequiredError/message)

A string containing the code for the error that occurred.

[`attribute string reason;`](/documentation/CKToolJS/AuthenticationRequiredError/reason)

A string that indicates the reason for the error.

[`attribute string redirectUrl;`](/documentation/CKToolJS/AuthenticationRequiredError/redirectUrl)

A redirect URL for the user to securely sign in using their Apple ID.

[`attribute string? requestUuid;`](/documentation/CKToolJS/AuthenticationRequiredError/requestUuid)

A unique identifier for this error.

[`attribute Int32? retryAfterSeconds;`](/documentation/CKToolJS/AuthenticationRequiredError/retryAfterSeconds)

The suggested time to wait in seconds before trying this operation again.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)