The Login API
On this Page
Other APIs
Introduction
The Login API is designed to allow approved partners access to user’s API keys given an email, password and (optionally) a subdomain. In other words, this API gives you the ability to gather the API key for a user without them having to visit Wufoo. This keeps your user engaged in your process because they don’t have to leave your site.
Request Format
This API accepts POST requests in the following format:
https://wufoo.com/api/v3/login.{xml|json}
- {xml|json} - You must choose between
xmlorjsonfor your return format
The POST parameters
The following parameters must be passed as post parameters to the Login API
integrationKey - this required parameter is a protected resource. Apply for your key to receive one.
email - this required is the user’s email, which acts as the identifier for her account.
password - this required parameter is your user’s password.
subdomain - this optional value parameter is the user’s subdomain (eg http://subdomain.wufoo.com/) and is required only if the email provided in the
emailparameter is that of a subuser or if the same email address is associated with two accounts. You may submit the login API request without this parameter, but you may receive a 409 Error if any of the above conditions are true.
Sample Response
Below is a sample response from a fictional POST call to the Login API.
<LoginResult>
<ApiKey>A192-RR67-Z82F-CEV9</ApiKey>
<UserLink>https://fishbowl.wufoo.com/api/v3/users/n7g3z1.xml</UserLink>
<Subdomain>fishbowl</Subdomain>
</LoginResult>
The <LoginResult> Element
A successful call to the Login APi will result in a returned <LoginResult> element. The children of which will be described below.
ApiKey - This is the goal of your Login call. You may use this to access all API calls.
UserLink - This hyperlink will bring you to the ‘entry point’ for all available API calls for this user.
Subdomain - The subdomain for the user in question. You’ll use this to form all subsequent request URLs.
409 Error
You’ll be returned a 409 error if your user meets any of the following conditions:
- The posted email address belongs to a subuser of the account
- The posted email address is associated with more than one account
So, you have the choice to ask your user for the subdomain every time, or you could catch the 409 error, and prompt the user for the subdomain then. Your choice.