> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# How to request a signature online (embedded signing)

> Learn how to collect signatures directly from the app UI with the Android SDK in a process called embedded signing.

This topic demonstrates how to collect signatures directly from the app UI in a process called [embedded signing](/docs/esign-rest-api/esign101/concepts/embedding). To present the signing request in the app UI, the logged-in SDK user must:

* be the document sender and
* have access to the sent envelope to retrieve the signing URL.

## Required data

Running the code in this how-to requires this data:

| Data element                | Description                                                                                                                                                                                                     |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \{ENVELOPE_ID}              | A [GUID](http://guid.one/) value that identifies a Docusign [envelope](/docs/esign-rest-api/esign101/concepts/envelopes). This value is automatically generated by Docusign when the envelope is created.       |
| \{RECIPIENT_CLIENT_USER_ID} | A string value that serves as an identifier of an individual signer throughout the signing process. The combination of this value, the signer's name, and the signer's email is used to uniquely identify them. |
| \{SIGNER_EMAIL}             | A string value for the email address where the signer will receive a notification of the signing request.                                                                                                       |
| \{SIGNER_NAME}              | A string value for the full name of the signer.                                                                                                                                                                 |

## Step 1. Log in to Docusign

To make the API call shown in this how-to, you must be logged in to Docusign.

See [How to log in to Docusign from your app](/docs/mobile-sdks/android-sdk/how-to/log-in) for details.

## Step 2. Start the embedded signing process

Start the embedded signing process using the method shown. The method retrieves the signing URL and loads the embedded signing session for the authenticated sender account.

**`Java`**

```java title="Java"
DSSigningDelegate signingDelegate = DocuSign.getInstance().getSigningDelegate();
signingDelegate.signOnline(context,
    "{ENVELOPE_ID}",
    new DSOnlineSigningListener() {
        @Override
        public void onCancel(String envelopeId, String recipientId) {
            Log.d("signOnline", "signing cancelled");
        }

        @Override
        public void onError(String envelopeId, DSSigningException exception) {
            Log.e("signOnline", exception.getLocalizedMessage());
        }

        @Override
        public void onRecipientSigningError(String envelopeId, String recipientId, DSSigningException exception) {
            Log.d("signOnline", exception.getLocalizedMessage());
        }

        @Override
        public void onRecipientSigningSuccess(String envelopeId, String recipientId) {
            Log.d("signOnline", "recipient signing success for recipient ID: " + recipientId);
        }

        @Override
        public void onStart(String envelopeId) {
            Log.d("signOnline", "signing started");
        }

        @Override
        public void onSuccess(String envelopeId) {
            Log.d("signOnline", "signing success for envelope ID: " + envelopeId);
        }
    }
);
```

**`Kotlin`**

```kotlin title="Kotlin"
val signingDelegate = DocuSign.getInstance().getSigningDelegate()
signingDelegate.signOnline(
    context,
    "{ENVELOPE_ID}",
    object : DSOnlineSigningListener {
        override fun onCancel(envelopeId: String, recipientId: String) {
            Log.d("signOnline", "signing cancelled")
        }

        override fun onError(envelopeId: String?, exception: DSSigningException) {
            Log.e("signOnline", exception.localizedMessage)
        }

        override fun onRecipientSigningError(
            envelopeId: String,
            recipientId: String,
            exception: DSSigningException
        ) {
            Log.d("signOnline", exception.localizedMessage)
        }

        override fun onRecipientSigningSuccess(envelopeId: String, recipientId: String) {
            Log.d("signOnline", "recipient signing success for recipient ID: $recipientId")
        }

        override fun onStart(envelopeId: String) {
            Log.d("signOnline", "signing started")
        }

        override fun onSuccess(envelopeId: String) {
            Log.d("signOnline", "signing success for envelope ID: $envelopeId")
        }
    }
)
```

## Expected response

If your call is successful, you will see the [WebView](https://developer.android.com/reference/android/webkit/WebView) that is returned by the SDK, and the user can complete the embedded signing process.

![Android Embedded Signing](/_fern-files/_img/a0ec78bce09d8149e71a16a458c14b29ea1782cd154db7714ff9505465dc5221.webp)

## Next steps

* See [How to create an envelope for offline signing (PDF)](/docs/mobile-sdks/android-sdk/how-to/offline-signing-pdf).
* Learn [How to create an envelope for offline signing (from a template)](/docs/mobile-sdks/android-sdk/how-to/offline-signing-template).
* See [How to sync offline signed envelopes](/docs/mobile-sdks/android-sdk/how-to/sync-offline).