> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/channel-manager-api/channel-manager-api/api-2.1/json-rpc-2.1/reference/single-sign-on-sso.md).

# Single sign-on (SSO)

Use this method to redirect and log in users of the Channel Manager/Partner account automatically from your system into their CM/Partner account based on their email address. This method connects third-party systems with the 2Checkout Channel Manager/Partner Control Panel and enables your partners to seamlessly sign in to their Control Panel.

The **getPartnerSingleSignOn** API method logs the partner users only into the Channel Manager account associated with your 2Checkout account. This method will not replicate the functionality of a full sign-in operation for users who are partnered with multiple 2Checkout vendors and are leveraging connected partner accounts.

## Requirements

{% hint style="info" %}
This method requires you to set a specific partner using [**setPartner**](/channel-manager-api/channel-manager-api/api-2.1/json-rpc-2.1/reference/partner/set-partner.md).
{% endhint %}

## Request parameters

<table><thead><tr><th width="149.800048828125">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><strong>Required (string)</strong><br>Session identifier, output of the Login method. An exception is thrown if the values are incorrect.</td></tr><tr><td><code>email</code></td><td><strong>Required (string)</strong><br>Channel Manager / Partner user account email address.</td></tr><tr><td><code>partnerCode</code></td><td><strong>Required (string)</strong><br>Unique partner identifier.</td></tr><tr><td><code>accessPage</code></td><td><p><strong>Required (string)</strong><br>The specific Channel Manager / Partner control panel page you want the user to be redirected to.<br>Possible values:</p><ul><li>https://secure.avangate.com/partners/</li><li>https://secure.avangate.com/partners/partner_add_order.php</li><li>https://secure.avangate.com/partners/reports_customers.php</li><li>https://secure.avangate.com/partners/proformas.php</li><li>https://secure.avangate.com/partners/account.php</li><li>https://secure.avangate.com/partners/partnership.php</li></ul><p>You can use any URL in the Channel Manager / Partner Control Panel, including links to specific orders, subscriptions/licenses, and partner invoices.</p></td></tr><tr><td><code>validityTime</code></td><td><strong>Optional (int)</strong><br>The time, in seconds, before the single sign-on URL returned by this method expires. By default, the URL expires after 10 seconds.</td></tr><tr><td><code>validationIP</code></td><td><strong>Optional (string)</strong><br>The IP address of the Channel Manager / Partner Control Panel user, required for security purposes. Can be an empty string or a valid IP, but cannot be NULL.</td></tr></tbody></table>

### Request sample

```php
<?php

require ('PATH_TO_AUTH');  // Authentication example: https://knowledgecenter.2checkout.com/Integration/Channel_Manager_API/JSON-RPC/02Authentication
require ('PATH_TO_setPartner'); // setPartner example: https://knowledgecenter.2checkout.com/Integration/Channel_Manager_API/JSON-RPC/06Reference/Partner/00Set_partner

$email = 'YOUR_PARTNER_EMAIL';
$partnerCode = 'YOUR_PARTNER_CODE';
$accessPage = 'YOUR_ACCESS_PAGE_URL';
$validityTime = VALIDITY_TIME;
$validationIP = 'VALIDATION_IP_ADDRESS';

$jsonRpcRequest = array (
  'jsonrpc' => '2.0',
  'id' => $i++,
  'method' => 'getPartnerSingleSignOn ',
  'params' => array($SessionID, $email, $partnerCode , $accessPage, $validityTime, $validationIP)
);
var_dump (callRPC((Object)$jsonRpcRequest, $host));
```

### Response parameters

<table><thead><tr><th width="189.4000244140625">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>Single sign-on URL</code></td><td><strong>String</strong><br>The string is the complete single sign-on URL with a token to allow authentication into Channel Manager from external domains. Partner account users are logged in automatically to their Channel Manager accounts.<br>The URL can be used only once and only within the interval of time in which it's valid. Call this method again to generate a new single sign-on URL for a subsequent login action.</td></tr></tbody></table>

### Errors

<table><thead><tr><th width="221.7999267578125">Error</th><th>Description</th></tr></thead><tbody><tr><td><strong>INVALID_EMAIL</strong></td><td>The email address is mandatory.</td></tr><tr><td><strong>INVALID_EMAIL</strong></td><td>Please specify a valid email address.</td></tr><tr><td><strong>INVALID_PARTNER</strong></td><td>The partner code is mandatory.</td></tr><tr><td><strong>INVALID_PARTNER</strong></td><td>Partner code provided is not associated to an active partner account.</td></tr><tr><td><strong>INVALID_USER</strong></td><td>Email address provided is not associated to a partner account user.</td></tr><tr><td><strong>INVALID_URL</strong></td><td>The page URL is mandatory.</td></tr><tr><td><strong>INVALID_URL</strong></td><td>The page URL provided is not valid.</td></tr><tr><td><strong>INVALID_VALIDITY_TIME</strong></td><td>Validity time needs to be a positive numeric value.</td></tr><tr><td><strong>INTERNAL_ERROR</strong></td><td>Cannot save security token. Please try again.</td></tr></tbody></table>


---

# 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 dynamically by asking a question.

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

```
GET https://docs.2checkout.com/channel-manager-api/channel-manager-api/api-2.1/json-rpc-2.1/reference/single-sign-on-sso.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 `build a script that syncs our docs to a CMS` 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.
