# Integrating the SDK using the sample backend

> \[!WARNING]
>
> The TwilioAuth SDK has been deprecated. This means that while we will continue to provide maintenance support for existing customers and their usage, we discourage new customers and new usage, as we may shut it down entirely in the future. We strongly recommend using the [Verify Push SDK](/docs/verify/push) instead, which currently supports the Push channel, and will be enhanced to support the TOTP channel in the future.

For instructions on how to get the *AUTHY\_API\_KEY* please check [this](/docs/authy/twilioauth-sdk/quickstart/obtaining-authy-api-key)

1. Install the iOS/Android SDK

*iOS*

* Add the pod to your `Podfile`

```bash
target 'YourTarget' do
    pod 'TwilioAuth'
end
```

* Run the following command in your terminal

```bash
pod install
```

* Or download the framework [here](https://media.twiliocdn.com/sdk/ios/auth/releases/1.2.6/twilio-auth-ios-1.2.6.tar.bz2)

In the Build Phases tab of the project editor, click the + button at the top and select "New Run Script Phase". Enter the following code into the script text field:

```bash
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/TwilioAuth.framework/strip-frameworks.sh"
```

*Android*

* Add the dependency to your `app/build.gradle` file

```bash
compile 'com.twilio:auth:+'
```

2. Deploy the [sample backend](https://github.com/twilio/authy-sdk-backend) application

![Deploy Authy SDK backend with options for app name and runtime selection.](https://docs-resources.prod.twilio.com/bb9afc9878794c9d90eb4273f41395d90e863f8b672911fe0c8d62fd9d0dabc3.gif)

3. Add *AUTHY\_API\_KEY* as a config variable as follows:

![Deploy Sample Backend.](https://docs-resources.prod.twilio.com/7e480f1b781473e835c713bae8453cad30a02a16819ccf7098c95c7d7cf3011b.gif)

4. Obtain the USER\_AUTHY\_ID

```bash
curl "https://api.authy.com/protected/json/users/new?api_key=AUTHY_API_KEY" \
-d user[email]="user@domain.com" \
-d user[cellphone]="317-338-9302" \
-d user[country_code]="54"
```

[More info on enabling 2FA](/docs/verify/developer-best-practices)

5. In your app obtain the registration token from the sample backend

```bash
POST https://yourapp.herokuapp.com/registration/?authy_id="USER_AUTHY_ID"
```

6. Create an approval request

```bash
curl "https://api.authy.com/onetouch/json/users/USER_AUTHY_ID/approval_requests" \
-d api_key="AUTHY_API_KEY" \
-d message="Your approval request message" 
```

More info about [creating approval requests](/docs/authy/api/push-authentications#create-an-approval-request)

You can also use the sample API scripts [available here](https://github.com/AuthySE/Authy-API-Samples/blob/master/createApprovalRequest.sh) to create a new approval request.

To check the status of the approval request you can use the sample API script [available here](https://github.com/AuthySE/Authy-API-Samples/blob/master/checkRequestStatus.sh). Don't forget to update your [environment variables](https://github.com/AuthySE/Authy-API-Samples/blob/master/.api.env) when using the [sample API scripts](https://github.com/AuthySE/Authy-API-Samples).

7. Approve/Deny request

To get more info about what you can do with the SDK: [Quick Reference](/docs/authy/twilioauth-sdk/quick-reference)

8. To delete a specific device you can use the sample API scripts [available here](https://github.com/AuthySE/Authy-API-Samples/blob/master/deleteDevice.sh)

To obtain the :device\_id call the `getDeviceId` method of the sdk

## Support

If you find any inconveniences while following this guide please file us an issue

[Android issues on github.com](https://github.com/twilio/mobile-sdk-sample-android/issues)

[iOS issues on github.com](https://github.com/twilio/mobile-sdk-sample-ios/issues)
