PROBLEM
How do I authenticate the Atmail WebMail Client API?
ENVIRONMENT
- On-Premise Server + WebMail Installations: Version 6.0 > Current Version
- Webmail Only Installations: Version 6.0 > Current Version
CAUSE
WebMail API requirement.
RESOLUTION
Authentication
Authentication is the fist step for invoking all other Atmail API requests.
Resource URI
http://domain.com/index.php/mail/auth/processlogin
Input Parameters
Property | Description |
---|---|
MailType |
The protocal for access mail, here must be 'IMAP' |
The full email address | |
password | The password |
emailDomain | The email domain |
emailName | The email name |
expectJson | Flag to expect JSON response, must be '1' |
expectSettings | Flag to expect user settings, can be '1' or '0' |
requestedServer | Domain or IP for requested server, or empty string if the server is the same as email domain |
HTTP GET
Returns a JSON encoded string containing the result of authentication.
Example
http://atmail.local/index.php/mail/auth/processlogin { MailType : 'IMAP', email : 'james@atmail.local' emailDomain : 'atmail.local' emailName : 'james' expectJson : 1 password : 'xxxxxx' requestedServer : '' }
Returned JSON
{"auth":"success","Account":"james@atmail.com","SessionID":"be6vl1059qoq0r2hgqm2p26f01"}
Check Authentication
Check whether a user is already authenticated or not
Resource URI
http://domain.com/index.php/mobile/index/checkauth
HTTP GET
Returns a JSON encoded string containing the result of authentication.
Example
http://domain.com/index.php/mobile/index/checkauth
Returned JSON
{"auth":"success"} or {"auth":"failed"}
Comments