You are here: API Reference > Calls > login

login

The login call takes a user name and a password and logs you in to the Zuora server.

Syntax and Arguments

login(username, password)

The arguments are as shown in the following table. For information on the field types, see Field Types.

Argument Description
username The login name of the user who is logging in.
password The password for that user.

Using This Call

Use this call to log in to the Zuora server. The call returns a session ID, which you then use for subsequent calls for authenticating with the system.

Response

 LoginResult

Faults

LoginFault

UnexpectedErrorFault

Sample Code

Login login = new Login();
login.setUsername("username@company.com");
login.setPassword("password");
LoginResponse resp = stub.login(login);
LoginResult result = resp.getResult();
// set new endpoint
ServiceClient client = stub._getServiceClient();
client.getOptions().getTo().setAddress(result.getServerUrl());
// create session for all subsequent calls
SessionHeader header = new SessionHeader();
header.setSession(result.getSession());

See Also

Logging In to the Zuora System

Sessions

SessionHeader

LoginResult

SessionHeader

Copyright © 2008-2009 Zuora, Inc.