imazed/laravel-helpscout-sidebar

Render Laravel application data inside the Help Scout conversation sidebar, resolving customers server-side through the Help Scout Mailbox API.

Maintainers

Package info

github.com/iMazed/laravel-helpscout-sidebar

pkg:composer/imazed/laravel-helpscout-sidebar

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-08-27 16:25 UTC

This package is auto-updated.

Last update: 2026-08-27 18:38:19 UTC


README

Render data from your Laravel application inside the Help Scout conversation sidebar, so support agents see who they are talking to without leaving the inbox.

Contents

In this file: Requirements · Installation · Help Scout setup · Security · Testing · Scope and versioning

Guides:

Requirements

  • PHP 8.3+
  • Laravel 12.x or 13.x
  • A Help Scout plan that includes API access (Standard and above at the time of writing)

Installation

composer require imazed/laravel-helpscout-sidebar

Publish the configuration:

php artisan vendor:publish --tag=helpscout-sidebar-config

Publish the resources:

php artisan vendor:publish --provider="Imazed\HelpScoutSidebar\HelpScoutSidebarServiceProvider"

Add your credentials to .env:

# Signs the incoming iframe request
HELPSCOUT_SIDEBAR_SECRET=your-help-scout-app-secret

# Authenticates outgoing Mailbox API requests
HELPSCOUT_SIDEBAR_API_ENABLED=true
HELPSCOUT_SIDEBAR_APP_ID=your-oauth-app-id
HELPSCOUT_SIDEBAR_APP_SECRET=your-oauth-app-secret

Then point config/helpscout-sidebar.php at your customer model, if it is not App\Models\User:

'customer_model' => App\Models\Account::class,
'customer_email_column' => 'billing_email',

Sidebar content is not published. To change what the sidebar shows, implement BuildsSidebar (see Building the sidebar). Publishing the view is for the surrounding HTML, and it is not required in order to use your own view: point view in config/helpscout-sidebar.php at any view of your own.

'view' => 'helpscout::my-sidebar',

Help Scout setup

You need two different sets of Help Scout credentials, and they do different jobs: the sidebar app's secret verifies requests coming in, the OAuth app's credentials authenticate requests going out to the Mailbox API. They are not interchangeable.

1. The sidebar app

Create a custom app in Help Scout and point its callback URL at your route:

https://your-site.com/helpscout/sidebar

Set a secret on the app and put the same value in HELPSCOUT_SIDEBAR_SECRET.

If your callback URL carries static query parameters of your own, list them under signature.ignore so they are excluded before verification:

'signature' => [
    'ignore' => ['tenant'],
],

Read the security model before you use an ignored parameter for anything that matters.

2. The OAuth app

Under Your Profile → My Apps in Help Scout, you will find a Mailbox API Application with your app name. Copy the App ID and App Secret you find here into HELPSCOUT_SIDEBAR_APP_ID and HELPSCOUT_SIDEBAR_APP_SECRET.

The package uses the OAuth2 client credentials grant, which Help Scout documents for server-to-server integrations. There is no redirect URL, no consent screen, and no refresh token to manage: the package exchanges the credentials for an access token, caches it, and renews it when it expires.

Both values change if you ever uninstall and reinstall the app, and the symptoms are easy to misread. See Reading the Mailbox API section.

Security

Customer identity is established server-side. The callback's signature is verified before anything else runs, and the customer is resolved through the Mailbox API from signed identifiers only; nothing the browser sends can select a record.

A full description of the threat model (what the signature does and does not cover, what counts as attacker-controlled, and the design decisions that follow) is documented in Security model. To report a security issue, please open an issue.

Testing

composer test
composer format

License

MIT. See LICENSE.md.