Demo - Gameonn/xpunch GitHub Wiki

Intro

Defining a feature involving attendance management system

Logging in

To log in the following things must be sent (HMAC and and_api_key must be sent but are excluded)

Sending

Param Required Description
username yes should contain the username or email in plain text
psswd yes should contain the password in plain text
tz yes user's timezone as Olson formatted string, example America/Havana

Proper Response JSON

{
    "connected": true,
    "session": "6khe2cYg052eIJN2GSr7rs0jerHM1M4R5yogfMt3NjqIM6cPzeAC412OPXON",
    "pid": "4wgeZ7NZgqkL4mi8y2f1f4O1IAoS4l2CxRf0lFsx5KVjRwY9sQ",
    "phone": 1111111111
}
  • The session is the token that can be used to refresh the session later
  • The pid is the user's code which can be used for querying later on
  • The connected indicates whether the login was successful.