Spec - Users
Table Of Contents
- Get Auth Token
- Get User Info
- Get Accounts With Access
- Change Password
Get Auth Token
This function gets an auth token to be used in subsequent XML API calls.
Input
Email and password (from the form variables; not part of the XML). In the XML, DeviceID (optional - pass an ID for the device using to acces), AppKey (currently optional - an AppKey assigned by the CRM. Please contact support to obtain one for your app).
Output
Auth token to be passed in subsequent calls.
Example Request 1 (No optional parameters)
<GetAuthTokenRequest></GetAuthTokenRequest>
Example Request 2 (With optional parameters)
<GetAuthTokenRequest>
<DeviceID>98940B2C3A11</DeviceID>
<AppKey>AB938-34-5769-D23A</AppKey>
</GetAuthTokenRequest>
Successful Response
<GetAuthTokenResponse>
<Result>Success</Result>
<Token>(returned auth token)</Token>
</GetAuthTokenResponse>
Get User Info
This function allows the caller to information about the user logged in.
Input
None (user is based on log in information).
Output
Success or failure. On success name, email, address, city, state, zip, country, mobilephone of the user logged in. If the user is the account owner, the timezone of the account will also be included in the <Timezone> tag.
Example Request
<GetUserInfoRequest></GetUserInfoRequest>
Successful Response
<GetUserInfoResponse>
<Result>Success</Result>
<Name>Joe User</Name>
<Email>joeuser@exampleco.com</Email>
<Address>1313 Mockingbird Lane</Address>
<City>Exampleville</City>
<State>IL</State>
<Zipcode>60565</Zipcode>
<Country>USA</Country>
<Mobilephone>708-341-8988</Mobilephone>
</GetUserInfoResponse>
Get Accounts With Access
This function allows the caller to discover which accounts in the system the caller has access to. If the caller is an owner of the account, all operations are allowed, and passing an account ID to the other requests is optional (it will always default to the account the caller owns). If the caller is a shared user of an account, a list of groups the caller can access and which functions are available are returned.
Input
None
Output
Success or failure.
On success a list of accounts, with contact ID, group, and permission information for any accounts that the caller is not the owner but a shared user with access.
For accounts that the caller is the owner of or has contacts permissions, number of contacts in the account and maximum contacts for the account.
Example Request 1 (no shared access, owner only)
<GetAccountsWithAccessRequest></GetAccountsWithAccessRequest>
Successful Response 1
<GetAccountsWithAccessResponse>
<Result>Success</Result>
<Accounts>
<Account>
<AccountNumber>1891</AccountNumber>
<Contact_id>0</Contact_id>
<IsOwner>Y</IsOwner>
<Groups>
<Group>
<GroupID>1</GroupID>
<GroupName>My Group</GroupName>
<GroupType>Private</GroupType>
<IncludeLoginLink>Yes</IncludeLoginLink>
</Group>
<Group>
<GroupID>2</GroupID>
<GroupName>Business Leads</GroupName>
<GroupType>Private</GroupType>
<IncludeLoginLink>No</IncludeLoginLink>
</Group>
</Groups>
<NumberOfContacts>2312</NumberOfContacts>
<MaximumContacts>3000</MaximumContacts>
</Account>
</Accounts>
</GetAccountsWithAccessResponse>
Example Request 2 (account owner with shared access to another account)
<GetAccountsWithAccessRequest></GetAccountsWithAccessRequest>
Successful Response 2
<GetAccountsWithAccessResponse>
<Result>Success</Result>
<Accounts>
<Account>
<AccountNumber>1891</AccountNumber>
<Contact_id>0</Contact_id>
<IsOwner>Y</IsOwner>
<Groups>
<Group>
<GroupID>1</GroupID>
<GroupName>My Group</GroupName>
<GroupType>Private</GroupType>
<IncludeLoginLink>Yes</IncludeLoginLink>
</Group>
<Group>
<GroupID>2</GroupID>
<GroupName>Business Leads</GroupName>
<GroupType>Private</GroupType>
<IncludeLoginLink>No</IncludeLoginLink>
</Group>
</Groups>
<NumberOfContacts>565</NumberOfContacts>
<MaximumContacts>4996</MaximumContacts>
</Account>
<Account>
<AccountNumber>99599</AccountNumber>
<Contact_id>783</Contact_id>
<IsOwner>N</IsOwner>
<Groups>
<Group>
<ContactsPermission>Y</ContactsPermission>
<GroupsPermission>N</GroupsPermission>
<EmailPermission>N</EmailPermission>
<TrackingPermission>N</TrackingPermission>
<EventsPermission>N</EventsPermission>
<MediaPermission>N</MediaPermission>
<GroupID>20</GroupID>
<GroupName>Management</GroupName>
<GroupType>Private</GroupType>
<IncludeLoginLink>Yes</IncludeLoginLink>
</Group>
<Group>
<ContactsPermission>Y</ContactsPermission>
<GroupsPermission>N</GroupsPermission>
<EmailPermission>N</EmailPermission>
<TrackingPermission>N</TrackingPermission>
<EventsPermission>Y</EventsPermission>
<MediaPermission>N</MediaPermission>
<GroupID>23</GroupID>
<GroupName>Team Dev</GroupName>
<GroupType>Private</GroupType>
<IncludeLoginLink>Yes</IncludeLoginLink>
</Group>
</Groups>
<NumberOfContacts>42985</NumberOfContacts>
<MaximumContacts>49804</MaximumContacts>
</Account>
</Accounts>
</GetAccountsWithAccessResponse>
Example Request 3 (all accounts are shared access)
<GetAccountsWithAccessRequest></GetAccountsWithAccessRequest>
Successful Response 3
<GetAccountsWithAccessResponse>
<Result>Success</Result>
<Accounts>
<Account>
<AccountNumber>99599</AccountNumber>
<Contact_id>623</Contact_id>
<IsOwner>N</IsOwner>
<Groups>
<Group>
<ContactsPermission>Y</ContactsPermission>
<GroupsPermission>N</GroupsPermission>
<EmailPermission>N</EmailPermission>
<TrackingPermission>N</TrackingPermission>
<EventsPermission>Y</EventsPermission>
<MediaPermission>N</MediaPermission>
<GroupID>1</GroupID>
<GroupName>My Group</GroupName>
<GroupType>Private</GroupType>
<IncludeLoginLink>Yes</IncludeLoginLink>
</Group>
<Group>
<ContactsPermission>Y</ContactsPermission>
<GroupsPermission>N</GroupsPermission>
<EmailPermission>N</EmailPermission>
<TrackingPermission>N</TrackingPermission>
<EventsPermission>N</EventsPermission>
<MediaPermission>N</MediaPermission>
<GroupID>2</GroupID>
<GroupName>Management</GroupName>
<GroupType>Private</GroupType>
<IncludeLoginLink>No</IncludeLoginLink>
</Group>
<Group>
<ContactsPermission>Y</ContactsPermission>
<GroupsPermission>N</GroupsPermission>
<EmailPermission>N</EmailPermission>
<TrackingPermission>N</TrackingPermission>
<EventsPermission>Y</EventsPermission>
<MediaPermission>N</MediaPermission>
<GroupID>4</GroupID>
<GroupName>Members Group</GroupName>
<GroupType>Private</GroupType>
<IncludeLoginLink>Yes</IncludeLoginLink>
</Group>
</Groups>
<NumberOfContacts>565</NumberOfContacts>
<MaximumContacts>4996</MaximumContacts>
</Account>
</Accounts>
</GetAccountsWithAccessResponse>
Change Password
This function allows the caller to change the account password.
Input
- OldPassword
- NewPassword
- ConfirmPassword
Output
Success or failure.
Example Request
<ChangePasswordRequest>
<OldPassword>1234</OldPassword>
<NewPassword>4321</NewPassword>
<ConfirmPassword>4321</ConfirmPassword>
</ChangePasswordRequest>
Successful Response
<ChangePasswordResponse>
<Result>Success</Result>
</ChangePasswordResponse>