Secure Messaging API v8.12.2.0

<back to all web services

Login

The following routes are available for this service:
POST/api/v1/loginLogin to the Secure Messaging Api using a username and password. If trying to use an Authentication key, use the Authenticate operation instead.
POST/api/login
Login Parameters:
NameParameterData TypeRequiredDescription
UsernamebodystringYes
PasswordbodystringYes
CookielessbodybooleanNoDetermines whether session-token should be set in the Cookies. Defaults to false.

Allowable Values

  • true
  • false
MfaIdbodyintegerNo
MfaCodebodystringNo
LoginResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo
SessionTokenbodystringYes
UserServiceGuidbodystringNo
ResultbodyLoginResultYes
AvailableMfabodyList<UserMfa>Yes
AllowedMfaTypesbodyList<MfaType>Yes
UserMfa Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNo
MfaTypeformintNo
ActiveformboolNo
PhoneNumberformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

Error Codes:

Http Error Code: NotFound (404) - System Error Code: NotFound 810 - User does not exist in the system.
Http Error Code: Forbidden (403) - System Error Code: Forbidden 55 - Max failed login attempts reached. 56 - Password has expired. 804 - User is pending registration. 920 - User is not registered. 803 - Invalid credentials. 918 - User is Disabled. 905 - User's email or domain is restricted from this Portal. 46 - User cannot login because they have not validated with CRA.

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /json/reply/Login HTTP/1.1 
Host: cirius10.secure-messaging.com 
Content-Type: application/json
Content-Length: length

{"username":"String","password":"String","cookieless":false,"mfaId":0,"mfaCode":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"sessionToken":"String","userServiceGuid":"String","result":"Success","availableMfa":[{"id":0,"name":"String","mfaType":0,"active":false,"phoneNumber":"String"}],"allowedMfaTypes":["Sms"]}