> For the complete documentation index, see [llms.txt](https://docs.parallels.com/landing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallels.com/landing/ras-client-integration-guide/v21/ras-web-client-api/authentication-handoff-api.md).

# Authentication Handoff API

The Authentication Handoff API lets your web portal sign a user in to the RAS User Portal and optionally launch a published resource immediately with a single HTTP POST. It replaces the legacy appinfo payload mechanism and is the supported method for all new integrations.

Unlike the legacy API, no launch data is passed through a URL and no JavaScript payload needs to be hosted by your web server. Credentials are submitted in a POST body directly to the RAS Secure Gateway, which validates them and responds with a redirect. Token creation, validation, and session handling are managed entirely by the User Portal Gateway — your integration never needs to inspect or manage JWT contents.

### Endpoint

```
POST <https://<user-portal-domain>>/userportal/auth-handoff
```

Where `<user-portal-domain>` is the IP address or FQDN of the RAS Secure Gateway. The **Enable User Portal** option must be enabled for the gateway in the Parallels RAS Console.

### How it works

1. The user signs in to your web portal, where the available published resources are listed.
2. The user clicks a resource (or your portal initiates sign-in to the User Portal).
3. The browser POSTs the handoff payload to the Gateway endpoint.
4. The Gateway validates the credentials and returns a `3xx` response, typically `302`.
5. The browser follows the redirect automatically to the User Portal destination — either the portal itself or, if **appid** was specified, the requested published resource.

### Your responsibilities

* Collect (or already have) the user's RAS username and password.
* POST the payload to the Gateway endpoint from the browser.
* Let the browser follow the returned `3xx` redirect automatically.

That is the full scope of the integration. Anything beyond the redirect session handling, token management, resource launching is handled by the User Portal.

{% hint style="info" %}
**Note**: If your frontend does not have access to the user's credentials, the POST can also be initiated from your backend. See [**Backend-Initiated Handoff**](/landing/ras-client-integration-guide/v21/ras-web-client-api/authentication-handoff-api/backend-initiated-handoff.md).
{% endhint %}

The payload structure is described in the [next section](/landing/ras-client-integration-guide/v21/ras-web-client-api/authentication-handoff-api/request-payload.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.parallels.com/landing/ras-client-integration-guide/v21/ras-web-client-api/authentication-handoff-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
