Login
From API Documentation
The login call takes a user name and a password and logs you in to the Zuora server.
Note that although you can log in, you cannot explicitly log out. The session timeout for any given login session is two (2) hours.
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
Faults
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
