# Connecting to an Apple Service with Step inputs

If you wish to deploy to multiple teams or deploy to a team where authentication is different from the connected one you’ve been using, then you can add your preferred authentication into the Step’s inputs. This will override the connection previously set in **Bitrise Developer Connection**.

This way connection is restricted to the given Step where you set up authentication.

:::important[2FA and Apple ID authentication]

If 2FA is required for your Apple ID, then you must use the Apple ID authentication with the [**Deploy to App Store Connect with Deliver (formerly iTunes Connect)**](https://github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver) and the [**fastlane**](https://github.com/bitrise-io/steps-fastlane) Steps instead of authenticating through Step inputs.

:::

## Authenticating in a Step with API key

**API-key & Apple ID**

1. Add one of the following Steps to your Workflow:

   - fastlane
   - Deploy to App Store Connect with Deliver (formerly iTunes Connect)
   - Deploy to App Store Connect - Application Loader (formerly iTunes Connect)

   :::caution[Either API key or Apple ID authentication in Step inputs]

   You can only add one type of authentication into the Step, either the API key one or the Apple ID one. In either case, make sure the **Bitrise Apple Developer Connection** input is set to `off`, otherwise the Step will go with the configured authentication method found in **Apple Service connection** (unless you decide to remove the connection on the **Stores** tab).

   :::
1. Upload the API key to the **GENERIC FILE STORAGE** section of the **Code Signing & Files** tab.
1. Set the **Bitrise Apple Developer Connection** input to `off`.
1. Set the **Issuer ID** as a secret Environment Variable in the respective field of the Step.
1. Configure the **API Key path** and **API Issuer** inputs.
1. Save your changes and run a new build.

**API-key only Steps**

1. Add one of the following Steps to your Workflow:

   - Manage iOS Code Signing
   - Xcode Archive & Export for iOS
   - Export iOS and tvOS Xcode archive
   - Xcode Build for testing for iOS
1. Upload your App Store Connect API private key file (.p8 file) to the **Generic File Storage** in the **Code Signing & Files** tab.
1. Set the **Automatic code signing method** to `api-key`. For Manage iOS Code Signing, the equivalent input is named **Apple service connection method**.
1. Set the following Step inputs under the **App Store Connect connection override** input group:

   - **App Store Connect API private key**: Local path or remote URL to the private key (.p8 file) for App Store Connect API. Set this input to the automatically generated Env Var connected to the App Store Connect API private key file (.p8 file) you uploaded to the Generic File Storage in step 2.
   - **App Store Connect API key ID**: Private key ID used for App Store Connect authentication.
   - **App Store Connect API issuer ID**: Private key issuer ID used for App Store Connect authentication.

## Authenticating in a Step with Apple ID and password

:::caution[Either API key or Apple ID authentication in Step inputs]

You can only add one type of authentication into the Step, either the API key one or the Apple ID one. In either case, make sure the **Bitrise Apple Developer Connection** input is set to `off`, otherwise the Step will go with the configured authentication method found in **Apple Service connection** (unless you decide to remove the connection on the **Stores** tab).

:::

1. Add the Step to your Workflow.
1. Set the **Apple ID** and **Password**.
1. Set the **Bitrise Apple Developer Connection** input to `off`.
1. Save your changes and run a new build.
