# The App-Specific Shared Secret

The App-Specific Shared Secret is a unique authentication key that allows RevenueCat to securely communicate with Apple's servers on your behalf. This secret is **mandatory for receipt validation** when using **StoreKit 1**.

StoreKit 1 is now deprecated by Apple. New apps are recommended to use **StoreKit 2**. See our [migration guide](/content/docs/sdk-guides/ios-native-4x-to-5x-migration/index.html) for details.

## StoreKit Version Requirements

The App-Specific Shared Secret is required for **StoreKit 1** implementations. For **StoreKit 2** apps, you'll need an [In-App Purchase Key](/content/docs/service-credentials/itunesconnect-app-specific-shared-secret/in-app-purchase-key-configuration/index.html) instead.

### StoreKit 2 (Recommended)

- **Required**: [In-App Purchase Key](/content/docs/service-credentials/itunesconnect-app-specific-shared-secret/in-app-purchase-key-configuration/index.html) (comprising Issuer ID, Key ID, and Private Key)
- **Use case**: Modern apps using iOS 15+ with RevenueCat SDK v5.0+
- **Purpose**: Server-to-server communication with Apple's App Store Server API for validating transactions, managing subscriptions, and accessing detailed purchase information

The In-App Purchase Key is required for all in-app purchases (including subscriptions) when using StoreKit 2 and RevenueCat v5.0+. This key enables RevenueCat to securely access Apple's APIs and ensure accurate validation and reporting.

### StoreKit 1

- **Required**: App-Specific Shared Secret
- **Use case**: Legacy apps, apps targeting iOS 15 or earlier
- **Purpose**: Server-side receipt validation and subscription management for the traditional receipt-based flow

## Setup (StoreKit 1 Only)

This setup is only required for StoreKit 1 implementations. If you're using **StoreKit 2**, see [In-App Purchase Key Configuration](/content/docs/service-credentials/itunesconnect-app-specific-shared-secret/in-app-purchase-key-configuration/index.html) instead.

### 1. Generating an App-Specific Shared Secret

1. Log in to [App Store Connect](https://appstoreconnect.apple.com/)
2. Navigate to "My Apps" and select your app
3. Select "App Information" under the "General" section from the left side menu
4. Select "Manage" under the App-Specific Share Secret section from the right side

5. Generate and copy your shared secret

### 2. Enter the Shared Secret in RevenueCat

Enter the secret in your iOS app settings in the RevenueCat dashboard:

## Troubleshooting

### Receipt Validation Issues

If you're experiencing server-side receipt validation failures, ensure you've configured the appropriate credentials for your StoreKit version:

- **StoreKit 1**: App-Specific Shared Secret (this page)
- **StoreKit 2**: [In-App Purchase Key](/content/docs/service-credentials/itunesconnect-app-specific-shared-secret/in-app-purchase-key-configuration/index.html)

### Migration Context

If you're migrating from StoreKit 1 to StoreKit 2, you'll need to:

1. Update to [RevenueCat SDK v5.0+](/content/docs/sdk-guides/ios-native-4x-to-5x-migration/index.html)
2. Configure an [In-App Purchase Key](/content/docs/service-credentials/itunesconnect-app-specific-shared-secret/in-app-purchase-key-configuration/index.html)
3. Remove the App-Specific Shared Secret configuration.
