Click or drag to resize
LoginControllerGet Method

[This is preliminary documentation and is subject to change.]

Authenticates and returns a server-side session token guid.

Namespace: WebServiceKit.Controllers
Assembly: WebServiceKit (in WebServiceKit.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public IHttpActionResult Get()

Return Value

Type: IHttpActionResult
200 OK and a session token guid if the login is successful, otherwise 401.
Remarks
Login credentials must be in the form of 'Login company:username:pass:deviceid' within the authentication header. The content after 'Login ' must be a base64 encoded string.
[Route("api/login")]
Examples
Python: (http://docs.python-requests.org/en/latest/)
baseUrl = 'http://webservices.mobileepiphany.com/api'
loginString = b'MyCompany:dev:dev:1234'
encodedLogin = base64.b64encode (loginString).decode("utf-8")
loginHeader = {'Authorization':'Login ' + encodedLogin}
loginUrl = baseUrl + '/login'

r = requests.get(loginUrl, headers=loginHeader)
See Also