Need An Email Marketing Solution For All Of Your Customers?

Partner With VerticalResponse!

getUserSignonURL


Partner API Only
The getUserSignonURL() method authenticates the specified VerticalResponse user and returns a URL that can be used once to log in as the specified user without entering a password. The URL will be valid for the specified number of seconds, the maximum allowed time to live is 120 seconds.

When the user logs out, they will be redirected to the logout_url specified when requesting the signon URL. When the user’s session times out or the signon URL is invalid, the user will be redirected to the specified login URL or to the partner’s specified login page if no login URL was specified.

This feature must be enabled on a per-partner basis; if you are interested in using it, contact your partner account manager.

Note: this method is considered an administrative function, so it should *not* be called when logged in using impersonate_user. Rather, it should be called as the master account itself.

Input

[vrtypens:getUserSignonURLArgs]

session_id [xsd:string] (required)
Your API session id.
ttl [xsd:integer]
The number of seconds the user signon URL will be valid.
This must be an integer between 1 and 120.
logout_url [xsd:string]
The URL to which the user should be redirected when they log out of the VR application.
login_url [xsd:string]
The URL to which the user should be redirected when their session times out. If this is not specified, the global cobrand value will be used.
user [xsd:string]
Log in as this partner subaccount. The value is the subaccount’s application login username (an email address).
post_login_path [xsd:string]
The path to which browsers will be redirected after successfully logging in via single signon.
If not specified, the browser will be redirected to the default “welcome” page.
You can set the path to the editor using: https://app-p0.verticalresponse.com/app/emails/builder#/EMAIL_ID/build
You can set the path to the test/preview page using: https://app-p0.verticalresponse.com/app/emails/builder#/EMAIL_ID/test

Output

[xsd:string]
The output is a URL to which the partner application can redirect the user to log them directly into the VerticalResponse application.

Examples

PHP

$vrapi->getUserSignonURL( array(
	'session_id' => $sid,
	'ttl' => 60,
	'logout_url' => 'http://www.example.com/confirmLogout.html',
	'login_url' => 'http://www.example.com/login.html',
	'user' => 'useremail@example.com'
) );

Ruby

vr.getUserSignonURL({
	'session_id' => sid,
	'ttl' => 60,
	'logout_url' => 'http://www.example.com/confirmLogout.html',
	'login_url' => 'http://www.example.com/login.html',
	'user' => 'useremail@example.com'
})

Java

BigInteger ttl = new BigInteger ("60");

GetUserSignonURLArgs gUSUA = new GetUserSignonURLArgs();
gUSUA.setSession_id(sessionID);
gUSUA.setTtl(ttl);
gUSUA.setUser("useremail@example.com");
gUSUA.setLogout_url("http://www.example.com/confirmLogout.html");
gUSUA.setLogin_url("http://www.example.com/login.html");

String URL = vr.getUserSignonURL(gUSUA);

C#/.NET

getUserSignonURLArgs gUSUA = new getUserSignonURLArgs();
gUSUA.session_id = sessionId;
gUSUA.ttl = "60";
gUSUA.user = "useremail@example.com";
gUSUA.logout_url = "http://www.example.com/confirmLogout.html";
gUSUA.login_url = "http://www.example.com/login.html";

String URL = "";

try
{
	URL = objVR.getUserSignonURL(gUSUA);
}
catch (Exception e)
{
	System.Console.WriteLine(e.Message);
}

Perl

$vrapi->getUserSignonURL( {
	session_id => $sid,
	ttl => 60,
	logout_url => 'http://www.example.com/confirmLogout.html',
	login_url => 'http://www.example.com/login.html',
	user => 'useremail@example.com'
} );