The login() method authenticates a VerticalResponse user and returns a session_id token that can be used for subsequent VRAPI calls. The maximum allowed session length is 120 minutes.
Partners can impersonate a subaccount by specifying their own login credentials and additionally providing the subaccount’s email address for the “impersonate_user” argument.
Partners can impersonate a subaccount by specifying their own login credentials and additionally providing the subaccount’s email address for the “impersonate_user” argument.
Input
username [xsd:string] (required)
Your VerticalResponse application login user name (an email address)
password [xsd:string] (required)
Your VerticalResponse application login password
session_duration_minutes [xsd:integer]
The session will close after this many minutes have elapsed since the last API call.
impersonate_user [xsd:string]
Log in as this partner subaccount. The value is the subaccount’s application login username (an email address).
Output
[xsd:string]
The output is a session id – a token that uniquely identifies your new session (e.g., “92cf2c60a9eb1c50a73c4361d0543105”).
Examples
Perl
my $sid = $vr->login( { username => 'account@emailaddress.com', password => 'password', session_duration_minutes => 15, } ); print "session id: $sid \n";
PHP
$sid = $vr->login( array( 'username' => 'account@emailaddress.com', 'password' => 'password', 'session_duration_minutes' => 15, ) ); echo "session id: $sid \n";
Ruby
sid = vr.login({ 'username' => 'account@emailaddress.com', 'password' => 'password', 'session_duration_minutes' => 15, }) puts "session id: #{sid}\n"
Java
static final String USERNAME = "account@emailaddress.com"; static final String PASSWORD = "password"; BigInteger sessionTimeoutMinutes = new BigInteger( "10" ); LoginArgs loginArgs = new LoginArgs( USERNAME, PASSWORD, sessionTimeoutMinutes ); sessionID = vr.login( loginArgs ); System.out.println ("Login successful. Now connected with session ID = " + sessionID);
C#.NET
loginArgs objla = new loginArgs(); objla.username = strUserName; objla.password = strPassword.ToString(); string _sSessionId = vr.login(objla);