<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "VideoSubscriberAccount",
  "identifier" : "/documentation/AutomaticSignInAPI",
  "metadataVersion" : "0.1.0",
  "role" : "Framework",
  "symbol" : {
    "kind" : "Framework",
    "modules" : [
      "Automatic Sign-In API"
    ],
    "preciseIdentifier" : "AutomaticSignInAPI"
  },
  "title" : "Automatic Sign-In API"
}
-->

# Automatic Sign-In API

Manage sign-in tokens from your web server that facilitate single sign-on across the devices of your media-streaming service customers.

## Overview

The Automatic Sign-In feature offers a single sign-on experience for media-streaming apps. The first time a person signs in to your media-streaming service through your app, your app calls the [`Video Subscriber Account`](/documentation/VideoSubscriberAccount) framework to prompt the person to opt in to Automatic Sign-In. If they agree, your app generates a string value token, or *sign-in token*. You provide the token to the [`Video Subscriber Account`](/documentation/VideoSubscriberAccount) framework, which stores it on the person’s Apple Account to sign the them in across all of their devices. When the person runs your app on another device, the operating system supplies the sign-in token from their Apple Account, which your app uses to sign them in automatically. To implement Automatic Sign-In for your media-streaming app on Apple devices, see <doc://com.apple.videosubscriberaccount/documentation/VideoSubscriberAccount/signing-people-in-to-media-apps-automatically>.

This API works in conjunction with [`Video Subscriber Account`](/documentation/VideoSubscriberAccount) to update or delete sign-in tokens from your web server. You might update or delete sign-in tokens from your web server in the following conditions:

- Your website offers UI to let the person opt out of Automatic Sign-In, or to flag a specific log in as unauthorized.
- The person changes their password and wants to sign out from all of their devices.

### Authenticate your requests

The web service needs to know which tokens to operate on and to certify the authenticity of your requests, which you facilitate by adding a bearer token in your request header. See <doc://com.apple.videosubscriberaccount/documentation/VideoSubscriberAccount/authorizing-api-calls-using-bearer-tokens>.

### Test in the sandbox environment

To test the API on your web server during development, you can operate on test data by sending endpoint requests to the sandbox environment. From your web server, direct your test calls using the sandbox base URL: `https://api.storekit-sandbox.itunes.apple.com/`. For example, to call [`Update Sign-In Token`](/documentation/AutomaticSignInAPI/Update-this-token-for-all-associated-users) in the sandbox environment, send a request using the URL:

```other
https://api.storekit-sandbox.itunes.apple.com/account/v1/autoSignIn/update
```

To generate test data to operate on:

- Sign into your testing device with a Sandbox Apple Account (see [Create a Sandbox Apple Account](https://developer.apple.com/help/app-store-connect/test-in-app-purchases/create-a-sandbox-apple-account)).
- Run a development or Ad Hoc build on your testing device. Any sign-in token your app provides the operating system (via [`updateAutoSignInToken(_:updateContext:)`](/documentation/VideoSubscriberAccount/VSUserAccountManager/updateAutoSignInToken(_:updateContext:))) creates test data in the sandbox environment when the interaction occurs in any development or Ad Hoc deployment of your app.

## Topics

### Authorization

  <doc://com.apple.videosubscriberaccount/documentation/VideoSubscriberAccount/authorizing-api-calls-using-bearer-tokens>

### Token updates

[`Update Sign-In Token`](/documentation/AutomaticSignInAPI/Update-this-token-for-all-associated-users)

Updates a specific sign-in token to a new value.

[`UpdateAutoSignInTokenRequest`](/documentation/AutomaticSignInAPI/UpdateAutoSignInTokenRequest)

The request body that contains the old sign-in token and the new sign-in token.

### Token deletion

[`Delete Sign-In Token`](/documentation/AutomaticSignInAPI/Delete-this-token-for-all-associated-users)

Deletes a specific sign-in token.

[`DeleteAutoSignInTokenRequest`](/documentation/AutomaticSignInAPI/DeleteAutoSignInTokenRequest)

The request body that contains the sign-in token to be deleted.



---

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)