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]
This must be an integer between 1 and 120.
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]
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' } );