PHPackages                             coopbelvedere/laravel-basecamp-api - 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. coopbelvedere/laravel-basecamp-api

AbandonedArchivedLibrary[API Development](/categories/api)

coopbelvedere/laravel-basecamp-api
==================================

API Wrapper for Basecamp3

v1.5.1(2y ago)1924.2k7MITPHPPHP &gt;=7.0

Since Oct 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/CoopBelvedere/laravel-basecamp-api)[ Packagist](https://packagist.org/packages/coopbelvedere/laravel-basecamp-api)[ RSS](/packages/coopbelvedere-laravel-basecamp-api/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (5)Versions (19)Used By (0)

Laravel Basecamp API
====================

[](#laravel-basecamp-api)

Warning

This repo is now readonly and no longer maintained.

An API wrapper for Basecamp 3.

Prerequisites
-------------

[](#prerequisites)

### Create an integration

[](#create-an-integration)

Visit  and register your app.

Add the credentials in your .env file as:

```
THIRTYSEVENSIGNALS_CLIENT_ID=your_client_id
THIRTYSEVENSIGNALS_CLIENT_SECRET=your_client_secret_key
THIRTYSEVENSIGNALS_REDIRECT_URI=http://localhost/login/basecamp/callback

```

And add the config variables to your `config/services.php` file:

```
    '37signals' => [
        'client_id' => env('THIRTYSEVENSIGNALS_CLIENT_ID'),
        'client_secret' => env('THIRTYSEVENSIGNALS_CLIENT_SECRET'),
        'redirect' => env('THIRTYSEVENSIGNALS_REDIRECT_URI')
    ],

```

### OAuth2

[](#oauth2)

The Basecamp3 API only supports 3-legged authentication and makes calls on behalf of one user. To receive an access token, you can use [Laravel Socialite](https://github.com/laravel/socialite) with the [37signals Socialite Driver](https://github.com/SocialiteProviders/Providers/tree/master/src/ThirtySevenSignals). After you save the access token and the desired Basecamp3 account, you can now create an instance of the API wrapper.

```
composer require socialiteproviders/37signals

```

Add the socialite service provider to your `config/app.php` `providers` array key:

```
'providers' => [
    ...
    \SocialiteProviders\Manager\ServiceProvider::class,
]
```

Add the socialite event listener in your `app/Providers/EventServiceProvider.php` `listen` property:

```
protected $listen = [
    ...
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        \SocialiteProviders\ThirtySevenSignals\ThirtySevenSignalsExtendSocialite::class.'@handle',
    ],
];
```

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

[](#installation)

```
composer require coopbelvedere/laravel-basecamp-api
php artisan vendor:publish --provider="Belvedere\Basecamp\BasecampServiceProvider"

```

Add a `user-agent` to identify your app in your `config/basecamp.php` file. This is *mandatory* or any request will return a 400 error.

Usage
-----

[](#usage)

Retrieve your basecamp id, base uri (href), token and refresh token and initialize the API wrapper. Here's a basic example on the `routes/web.php`file to get you started.

```
Route::get('/login/basecamp', function () {
    return Socialite::driver('37signals')->redirect();
});

Route::get('/login/basecamp/callback', function () {
    $user = Socialite::driver('37signals')->user();

    Basecamp::init([
        'id' => $user->user['accounts'][0]['id'],
        'href' => $user->user['accounts'][0]['href'],
        'token' => $user->token,
        'refresh_token' => $user->refreshToken,
    ]);

    $projects = Basecamp::projects();
    dd($projects->index());
});
```

**NOTE:** You shouldn't initialize the API in the callback route, this is only to show you what data to keep from the socialite user. Save this data in the database, and/or the session to keep the connection active.

### Caching

[](#caching)

The client uses a Laravel Filesystem cache strategy by default. You can override this with your preferred Laravel cache store:

```
Basecamp::setCache(Cache::store('redis'));
```

### Middlewares (optional)

[](#middlewares-optional)

You can optionally add an array of middlewares to the Guzzle Handler Stack. Here is an example for logging a request:

```
Basecamp::setMiddlewares([
    \GuzzleHttp\Middleware::log(
        Log::getLogger(),
        new \GuzzleHttp\MessageFormatter('{method} {uri} HTTP/{version} {req_body}')
    )
]);
```

### Event Listener

[](#event-listener)

The Client also comes with a middleware which will refresh an expired access token and automatically retry the intended endpoint. You can listen to the `basecamp.refreshed_token` event to update the access token in your app. The event returns 2 parameters, your basecamp user id and the new access token.

You can add something like this in your `EventServiceProvider.php` boot method:

```
Event::listen('basecamp.refreshed_token', function ($id, $token) {
    $user = \App\User::where('basecamp_id', $id)->first();
    $user->access_token = $token->access_token;
    $user->expires_at = \Carbon\Carbon::now()->addSeconds($token->expires_in);
    $user->save();
});
```

### Pagination

[](#pagination)

Most collection of resources in Basecamp can be paginated.

```
// Get projects.
$projects = Basecamp::projects()->index();

// Get total of projects
$projects->total();

// Save the next page link for your next request
$nextPage = $projects->nextPage();

// Call the next page of projects.
$projects = Basecamp::projects()->index($nextPage);
```

### Resources documentation

[](#resources-documentation)

- [Attachments](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/attachments.md)
- [Campfires](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/campfires.md)
- [Chatbots](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/chatbots.md)
- [Client approvals](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/client_approvals.md)
- [Client correspondances](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/client_correspondences.md)
- [Client replies](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/client_replies.md)
- [Comments](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/comments.md)
- [Documents](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/documents.md)
- [Events](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/events.md)
- [Forwards](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/forwards.md)
- [Needles](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/needles.md)
- [Inboxes](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/inboxes.md)
- [Message Boards](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/message_boards.md)
- [Message types](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/message_types.md)
- [Messages](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/messages.md)
- [People](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/people.md)
- [Projects](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/projects.md)
- [Question answers](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/question_answers.md)
- [Questionnaires](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/questionnaires.md)
- [Questions](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/questions.md)
- [Recordings](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/recordings.md)
- [Schedule entries](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/schedule_entries.md)
- [Schedules](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/schedules.md)
- [Subscriptions](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/subscriptions.md)
- [Templates](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/templates.md)
- [To-do list groups](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/todolist_groups.md)
- [To-do lists](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/todolists.md)
- [To-dos](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/todos.md)
- [To-do sets](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/todosets.md)
- [Uploads](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/uploads.md)
- [Vaults](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/vaults.md)
- [Webhooks](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/docs/webhooks.md)

License
-------

[](#license)

[MIT](https://github.com/coopbelvedere/laravel-basecamp-api/blob/master/LICENSE)

Copyright (c) 2017-present, Coopérative Belvédère Communication

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 77.4% of commits — single point of failure

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

Every ~137 days

Recently: every ~273 days

Total

18

Last Release

789d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/85fbf9adc2596af575472f146fb6b1d2b62bd351c426fcefa80f014b98d5942d?d=identicon)[yuters](/maintainers/yuters)

![](https://www.gravatar.com/avatar/38163ef16e00e7c079f3b6836967a84b49c190a52ae3862a0aae59cdb0aa22e4?d=identicon)[coopbelvedere](/maintainers/coopbelvedere)

---

Top Contributors

[![yuters](https://avatars.githubusercontent.com/u/801718?v=4)](https://github.com/yuters "yuters (41 commits)")[![evzharko](https://avatars.githubusercontent.com/u/26651288?v=4)](https://github.com/evzharko "evzharko (3 commits)")[![rehmatworks](https://avatars.githubusercontent.com/u/23554187?v=4)](https://github.com/rehmatworks "rehmatworks (2 commits)")[![khanmassab](https://avatars.githubusercontent.com/u/101227936?v=4)](https://github.com/khanmassab "khanmassab (1 commits)")[![mixisLv](https://avatars.githubusercontent.com/u/3735128?v=4)](https://github.com/mixisLv "mixisLv (1 commits)")[![adminbelvedere](https://avatars.githubusercontent.com/u/41793019?v=4)](https://github.com/adminbelvedere "adminbelvedere (1 commits)")[![stevethomas](https://avatars.githubusercontent.com/u/1127412?v=4)](https://github.com/stevethomas "stevethomas (1 commits)")[![vrodriguero](https://avatars.githubusercontent.com/u/53244381?v=4)](https://github.com/vrodriguero "vrodriguero (1 commits)")[![xavierhb](https://avatars.githubusercontent.com/u/2368418?v=4)](https://github.com/xavierhb "xavierhb (1 commits)")[![Jidbo](https://avatars.githubusercontent.com/u/25406344?v=4)](https://github.com/Jidbo "Jidbo (1 commits)")

### Embed Badge

![Health badge](/badges/coopbelvedere-laravel-basecamp-api/health.svg)

```
[![Health](https://phpackages.com/badges/coopbelvedere-laravel-basecamp-api/health.svg)](https://phpackages.com/packages/coopbelvedere-laravel-basecamp-api)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[ashallendesign/laravel-exchange-rates

A wrapper package for interacting with the exchangeratesapi.io API.

485677.8k](/packages/ashallendesign-laravel-exchange-rates)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

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