<!--
{
  "availability" : [
    "iOS: 6.0.0 - 15.0.0",
    "iPadOS: 6.0.0 - 15.0.0",
    "macCatalyst: 13.1.0 - 15.0.0",
    "macOS: 10.8.0 - 12.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Accounts",
  "identifier" : "/documentation/Accounts/ACAccountCredential",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Accounts"
    ],
    "preciseIdentifier" : "c:objc(cs)ACAccountCredential"
  },
  "title" : "ACAccountCredential"
}
-->

# ACAccountCredential

A credential object that encapsulates the information needed to authenticate a user.

```
class ACAccountCredential
```

## Overview

To create an account credential that uses the OAuth open authentication standard, use the [`init(oAuthToken:tokenSecret:)`](/documentation/Accounts/ACAccountCredential/init(oAuthToken:tokenSecret:)-6bfyf) method.

## Topics

### Initializing Credentials

[`-  initWithOAuthToken:tokenSecret:`](/documentation/Accounts/ACAccountCredential/init(oAuthToken:tokenSecret:)-6bfyf)

Initializes an account credential using OAuth.

[`-  initWithOAuth2Token:refreshToken:expiryDate:`](/documentation/Accounts/ACAccountCredential/init(oAuth2Token:refreshToken:expiryDate:)-67hmd)

Initializes an account credential using OAuth 2.

### Accessing Credential Properties

[`oauthToken`](/documentation/Accounts/ACAccountCredential/oauthToken)

The token used for the credential.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)