REST API: Current User

Last Updated: May 16, 2017

Description

Retrieves the user object for the currently authenticated user. This is the user that authenticated to TSheets during the oAuth2 authentication process.

Resource Information

HTTP Method GET
Endpoint https://rest.tsheets.com/api/v1/current_user
Authentication Token header required. See authentication section
Request format Everything is handled through the request uri on a GET.
Response format json
Response object User

Example

Retrieve current user.

## REQUEST
curl -H "Authorization: Bearer <Access-Token>" -i "https://rest.tsheets.com/api/v1/current_user"

## RESPONSE (shortened for readability)
HTTP/1.1 200 OK
Content-Type: application/json

{
 "results": {
  "users": {
   "1283037": {
    "id": 1283037,
    "first_name": "Joni",
    "last_name": "Smith",
    "group_id": 0,
    "active": true,
    "employee_number": 0,
    "salaried": false,
    "exempt": false,
    "username": "joni",
    "email": "",
    "payroll_id": "",
    "hire_date": "0000-00-00",
    "term_date": "0000-00-00",
    "last_modified": "2013-07-12T17:24:33+00:00",
    "last_active": "",
    "created": "2013-07-12T17:24:33+00:00",
    "mobile_number": "",
    "permissions": {
     "admin": false,
     "mobile": false,
     "status_box": false,
     "reports": false,
     "manage_timesheets": false,
     "manage_authorization": false,
     "manage_users": false,
     "manage_my_timesheets": false,
     "manage_jobcodes": false,
     "approve_timesheets": false,
     "manage_no_schedules": false,
     "manage_my_schedule": false,
     "manage_schedules": false,
     "manage_company_schedules": false,
     "view_my_schedules": false,
     "view_group_schedules": false,
     "view_company_schedules": false
    }
   }
  }
 }
}