> 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

# RequestSenderToken

## RequestSenderToken

This method is used to get a onetime use login token that allows the user to be placed into the Docusign sending wizard. Upon sending completion the user is returned to the return URL provided by the API application.

See the [Rules and Exceptions](/docs/esign-soap-api/reference/embedding-group/rules-and-exceptions-for-requestsendertoken) for this method.

**`C#`**

```csharp title="C#"
// Create and send envelope as shown in linked code
DocuSignWeb.EnvelopeStatus status = <create and send envelope > ;
// Request the token for the sender
String result = _apiClient.RequestSenderToken(status.EnvelopeID, _accountId, <
baseURL >
);
// Display token
Console.WriteLine("Sender token is {0}", result);
```

**`PHP`**

```php title="PHP"
// Create and send an envelope as shown in linked code
$response = <create and send envelope > ;
$createResult = $response - > CreateAndSendEnvelopeResult;
// Send
$requestSenderTokenparams = new RequestSenderToken();
$requestSenderTokenparams - > EnvelopeID = $createResult - > EnvelopeID;
$requestSenderTokenparams - > AccountID = $AccountID;
$requestSenderTokenparams - > ReturnURL = "https://127.0.0.1/";
$response = $api - > RequestSenderToken($requestSenderTokenparams);
```

### Schema

![Request sender token](/_fern-files/_img/0bd6001d90bb41d8e092296dc01fd3d528fb7ee44977fa57c44a12ed39ee9ddf.webp)

| Name       | Schema Type | Description                                                                                                                                                                                                                                                                                                                                                                                                 |
| ---------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| EnvelopeID | String      | Optional envelope ID. If provided the user will be placed into the envelope in process. If left blank the user will be placed into a new envelope for sending.                                                                                                                                                                                                                                              |
| AccountID  | String      | Docusign account ID to map the envelope to.                                                                                                                                                                                                                                                                                                                                                                 |
| ReturnURL  | String      | URL to send the user to upon completion of the sending process. The URL will have an event passed to it as a query parameter. The parameter will be named event. See the next section for a description of the valid events. The Docusign Envelope Dd will also be returned in the envelopeId parameter. Important: You must include HTTPS:// in the URL or the redirect might be blocked by some browsers. |

## In-session sending events

Events returned on the ReturnURL as a query string parameter. The event is sent in the parameter named `event`. The ReturnURL is called with the event on any completion state of the envelope send. Valid events can be found in the schema type InSessionSendEvent in the eSignature SOAP API XSD.

| Event      | Description                                                    |
| ---------- | -------------------------------------------------------------- |
| Send       | User sends the envelope.                                       |
| Save       | User saves a draft of the envelope.                            |
| Cancel     | User cancels the sending transaction. No envelope ID returned. |
| Error      | Error performing the send.                                     |
| SessionEnd | Sending session ended before the user completed.               |