PHPackages                             techsemicolon/hubstaff - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. techsemicolon/hubstaff

ActiveLibrary[API Development](/categories/api)

techsemicolon/hubstaff
======================

A package for Hubstaff API integration

0.0.1(8y ago)65.2k↓44.1%[1 issues](https://github.com/techsemicolon/hubstaffphp/issues)MITPHP

Since Sep 7Pushed 8y ago1 watchersCompare

[ Source](https://github.com/techsemicolon/hubstaffphp)[ Packagist](https://packagist.org/packages/techsemicolon/hubstaff)[ Docs](https://github.com/techsemicolon/hubstaffphp)[ RSS](/packages/techsemicolon-hubstaff/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Hubstaff Package for PHP
========================

[](#hubstaff-package-for-php)

This is a PHP package which integrates hubstaff API and gives you an efficient way to add hubstaff data/reports into your project. There are many improvements in terms of optimization in this package which are discussed below when applicable.

Installation
------------

[](#installation)

Via Composer

```
$ composer require techsemicolon/hubstaff
```

Getting your API credentials
----------------------------

[](#getting-your-api-credentials)

You will following 3 credentials to start with your hubstaff API integration :

1. Email : The email address you use to login into hubstaff
2. Password : The secure password you use to login into hubstaff
3. App Token : This is an API key which you can get by following below steps :

    - Visit
    - Login using email and password mentioned above
    - Go to My Apps on the left hand side menu (URL : [https://developer.hubstaff.com/my\_apps](https://developer.hubstaff.com/my_apps))
    - Click on "Create App" button
    - Enter the name of your application
    - Select The organization from the dropdown if you have multiple organizations
    - Click on "Save" and you will have your App Token which is a long alphanumeric string
    - Keep it safe, preferably store it in your env(environmental files) and not in your actual application

Getting data from the APIs
--------------------------

[](#getting-data-from-the-apis)

To check out hubstaff APIs reference, you can visit their official documentation url

How it internally works :

1. Hubstaff asks for email and password to get the auth token. Auth token is different that your app token. App token is like an API key whereas auth token is a secured authentication mechanism to make sure the request getting sent for API is well authenticated.
2. Then we use Auth Token and App Token together in headers to get the data we want

Don't Worry : Everything mentioned above is handled internally by the package, so there is no overhead for you ;)

Expiry of Auth Token :

Apparently the auth token for Hubstaff does not have any expiry. Hence, once you get an auth token, you can use it like forever within the application.

Getting auth token on every request :

I will suggest you to get the auth token using from  and save it in your env file to use within your application. This package has a flexibility to get auth token dynamically as the parameter of $authToken in authenticate() method is optional. However if the auth token is not having any expiry, it makes sence to get it once and save it to reuse rather than calling auth token API frequently. Also their server will throw error 429 which means too many requests for a particular API endpoint. So its better to get auth token and save it in your env just like you may save your app token.

To get any data using method you can use following example:

```
require_once('vendor/autoload.php');

use Hubstaff\Hubstaff;
//Get instance of Hubstaff

$hubstaff = Hubstaff::getInstance();

// Authenticate hubstaff with credentials you have
$appToken = 'your_app_token';
$email = 'your_hubstaff_email';
$password = 'your_hubstaff_password';
$authToken = 'your_auth_token';

$hubstaff->authenticate($appToken, $email, $password, $authToken);

//Get Repository you want and call the method on the same
$users = $hubstaff->getRepository('user')->getAllUsers();
```

Note : We have used singleton pattern internally to make sure that once authenticated, it uses the same instance everywhere for optimization and efficienty purposes.

Following table gives details description of methods available :

ActionRepositoryMethodParameters**Users**Retrieve list of usersuser$hubstaff-&gt;getRepository('user')-&gt;getAllUsers()$organizationMemberships (boolean : optional), $projectMemberships (boolean : optional)Retrieve a user detailsuser$hubstaff-&gt;getRepository('user')-&gt;getUserDetail()$userId (integer : required)Retrieve organization memberships for a useruser$hubstaff-&gt;getRepository('user')-&gt;getUserOrgMemberships()$userId (integer : required) $offset (integer : optional)Retrieve project memberships for a useruser$hubstaff-&gt;getRepository('user')-&gt;getUserProjectMemberships()$userId (integer : required) $offset (integer : optional)**Organizations**Retrieve list of organizationsorganization$hubstaff-&gt;getRepository('organization')-&gt;getAllOrgs()$offset (integer : optional)Retrieve a organization detailsorganization$hubstaff-&gt;getRepository('organization')-&gt;getOrgDetail()$orgId (integer : required)Retrieve projects for an organizationorganization$hubstaff-&gt;getRepository('organization')-&gt;getUserOrgMemberships()$orgId (integer : required) $offset (integer : optional)Retrieve users for an organizationorganization$hubstaff-&gt;getRepository('organization')-&gt;getOrgUsers()$orgId (integer : required) $offset (integer : optional)**Projects**Retrieve list of projectsproject$hubstaff-&gt;getRepository('project')-&gt;getAllProjects()$status (string : optional : values - active, archived ) $offset (integer : optional)Retrieve a project detailsproject$hubstaff-&gt;getRepository('project')-&gt;getProjectDetail()$projectId (integer : required)Retrieve users for a projectproject$hubstaff-&gt;getRepository('project')-&gt;getProjectUsers()$projectId (integer : required) $offset (integer : optional) $includeRemoved (boolean : optional)**Activities**Retrieve list of activitiesactivity$hubstaff-&gt;getRepository('project')-&gt;getActivities()$startTime (date : required : Y-m-d H:i:s) $stopTime (date : required : Y-m-d H:i:s) $organizationIds (array : optional) $userIds (array : optional) $offset (integer : optional)Retrieve applications(programs used) of activitiesactivity$hubstaff-&gt;getRepository('project')-&gt;getActivityApplications()$startTime (date : required : Y-m-d H:i:s) $stopTime (date : required : Y-m-d H:i:s) $organizationIds (array : optional) $userIds (array : optional) $offset (integer : optional)Retrieve urls of activitiesactivity$hubstaff-&gt;getRepository('project')-&gt;getActivityUrls()$startTime (date : required : Y-m-d H:i:s) $stopTime (date : required : Y-m-d H:i:s) $organizationIds (array : optional) $userIds (array : optional) $offset (integer : optional)**Screenshots**Retrieve list of screenshotsscreenshot$hubstaff-&gt;getRepository('screenshot')-&gt;getScreenshots()$startTime (date : required : Y-m-d H:i:s) $stopTime (date : required : Y-m-d H:i:s) $organizationIds (array : optional) $userIds (array : optional) $offset (integer : optional)**Notes**Retrieve list of notesnote$hubstaff-&gt;getRepository('note')-&gt;getNotes()$startTime (date : required : Y-m-d H:i:s) $stopTime (date : required : Y-m-d H:i:s) $organizationIds (array : optional) $userIds (array : optional) $offset (integer : optional)Retrieve a note detailsnote$hubstaff-&gt;getRepository('note')-&gt;getNoteDetail()$noteId (integer : required)**Tasks**Retrieve list of taskstask$hubstaff-&gt;getRepository('task')-&gt;getTasks()$projectIds (array : optional) $offset (integer : optional)Retrieve a task detailstask$hubstaff-&gt;getRepository('task')-&gt;getTaskDetail()$taskId (integer : required)**Weekly Reports**Retrieve time worked team report for a weekreport$hubstaff-&gt;getRepository('report')-&gt;getWeeklyTeamReport()$date (date : required : Y-m-d) $organizationIds (array : optional) $projectIds (array : optional) $userIds (array : optional)Retrieve time worked my report for a weekreport$hubstaff-&gt;getRepository('report')-&gt;getWeeklyMyReport()$date (date : required : Y-m-d) $organizationIds (array : optional) $projectIds (array : optional) $userIds (array : optional)**Custom Reports**Retrieve custom team report grouped by datereport$hubstaff-&gt;getRepository('report')-&gt;getCustomTeamReportByDate()$startDate (date : required : Y-m-d) $endDate (date : required : Y-m-d) $organizationIds (array : optional) $projectIds (array : optional) $userIds (array : optional) $showTasks (boolean : optional) $showNotes (boolean : optional) $showActivity (boolean : optional) $includeArchived (boolean : optional)Retrieve custom my report grouped by datereport$hubstaff-&gt;getRepository('report')-&gt;getCustomMyReportByDate()$startDate (date : required : Y-m-d) $endDate (date : required : Y-m-d) $organizationIds (array : optional) $projectIds (array : optional) $userIds (array : optional) $showTasks (boolean : optional) $showNotes (boolean : optional) $showActivity (boolean : optional) $includeArchived (boolean : optional)Retrieve custom team report grouped by memberreport$hubstaff-&gt;getRepository('report')-&gt;getCustomTeamReportByMember()$startDate (date : required : Y-m-d) $endDate (date : required : Y-m-d) $organizationIds (array : optional) $projectIds (array : optional) $userIds (array : optional) $showTasks (boolean : optional) $showNotes (boolean : optional) $showActivity (boolean : optional) $includeArchived (boolean : optional)Retrieve custom my report grouped by memberreport$hubstaff-&gt;getRepository('report')-&gt;getCustomMyReportByMember()$startDate (date : required : Y-m-d) $endDate (date : required : Y-m-d) $organizationIds (array : optional) $projectIds (array : optional) $userIds (array : optional) $showTasks (boolean : optional) $showNotes (boolean : optional) $showActivity (boolean : optional) $includeArchived (boolean : optional)Retrieve custom team report grouped by projectreport$hubstaff-&gt;getRepository('report')-&gt;getCustomTeamReportByProject()$startDate (date : required : Y-m-d) $endDate (date : required : Y-m-d) $organizationIds (array : optional) $projectIds (array : optional) $userIds (array : optional) $showTasks (boolean : optional) $showNotes (boolean : optional) $showActivity (boolean : optional) $includeArchived (boolean : optional)Retrieve custom my report grouped by projectreport$hubstaff-&gt;getRepository('report')-&gt;getCustomMyReportByProject()$startDate (date : required : Y-m-d) $endDate (date : required : Y-m-d) $organizationIds (array : optional) $projectIds (array : optional) $userIds (array : optional) $showTasks (boolean : optional) $showNotes (boolean : optional) $showActivity (boolean : optional) $includeArchived (boolean : optional)**Logs**Retrieve list of time edit logsreport$hubstaff-&gt;getRepository('report')-&gt;getTimeEditLogs()$startDate (date : required : Y-m-d) $endDate (date : required : Y-m-d) $organizationIds (array : optional) $projectIds (array : optional) $userIds (array : optional) $showTasks (boolean : optional) $showNotes (boolean : optional) $showActivity (boolean : optional) $includeArchived (boolean : optional)**Team Payments**Retrieve list of team paymentspayment$hubstaff-&gt;getRepository('payment')-&gt;getTimeEditLogs()$startTime (date : required : Y-m-d H:i:s) $stopTime (date : required : Y-m-d H:i:s) $organizationIds (array : optional) $userIds (array : optional) $offset (integer : optional)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3176d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31728773?v=4)[Mihir Bhende](/maintainers/techsemicolon)[@techsemicolon](https://github.com/techsemicolon)

---

Tags

phpapiintegrationhubstaff

### Embed Badge

![Health badge](/badges/techsemicolon-hubstaff/health.svg)

```
[![Health](https://phpackages.com/badges/techsemicolon-hubstaff/health.svg)](https://phpackages.com/packages/techsemicolon-hubstaff)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
