API Guide / API Reference / System API / Login
Login

Use this API to authenticate and get the access token. The access token is required when you send a request to another API. All APIs require the access token except Login and Hello API. If this request is successful, the server returns a response body that contains basic information and the access token.


URL

https://Witly.co/api/v2/login?user={0}&pwd={1}[&format={2}]


HTTP Method

GET


Request Body

Not required


Request Parameters

Parameter

Required

Description

user

Yes

Username

pwd

Yes

Password in plain text format

format

Optional

Expected return format. The default is JSON. Values are JSON and XML.


Example Request

https://Witly.co/api/v2/login?user=john_doe&pwd=qwerty


Example Response

TokenExpiryDate is an expiry date when the session is idle. It will be automatically extended another 20 minutes for each incoming request.

{

"Username""john",

"Fullname""john doe"

"Email""johndoe@Witly.co",

"LandingUrl""http://Witly.co/mobile-home",

"ProfileUrl""http://Witly.co/profile/johndoe",

"ProfileImageUrl": "http://Witly.co/temp/prifile.jpg",

"ThemeColor""#000000",

"Token": "5c33446ac1c049049f9232cf296bdf10",

"TokenExpiryDate""2017-04-26T20:24:44.3529664+07:00"

}


Last modified on Jan 23, 2018