Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration. With a managed OAuth app, Connect works without these variables; set them to use your own OAuth app instead.
VariableRequiredDescription
GUSTO_CLIENT_IDYesGusto OAuth Client ID (from the Developer Portal application) Docs.
GUSTO_CLIENT_SECRETYesGusto OAuth Client Secret Docs.

Setup

  1. Create a developer application: Sign up at https://dev.gusto.com and create an application. New apps start in the demo environment (api.gusto-demo.com) where you can create a free test company.
  2. Set the redirect URI: Add your deployment’s /api/auth/gusto/callback URL to the application’s redirect URIs.
  3. Set environment variables: Copy the application’s client_id and secret into GUSTO_CLIENT_ID and GUSTO_CLIENT_SECRET in your .env.
  4. Connect and verify: Complete the OAuth consent flow with a company admin account, then run Get Token Info to discover the company UUID and confirm access.
  • Scopes/permissions are configured on the application in the Developer Portal, not passed in the authorize URL
  • Access tokens expire after 2 hours; refresh tokens are single-use and rotate on every refresh
  • Production access (api.gusto.com) requires Gusto’s app approval; until then use the demo environment
  • Tools pin X-Gusto-API-Version: 2024-04-01; raise the default to adopt newer versions
Provider API reference: https://docs.gusto.com/app-integrations/docs/introduction

Tools

ToolAccessDescription
Get Token InfoReadGet the resource (company) and scope associated with the current access token
Get CompanyReadGet a company’s profile, locations, and entity details
List EmployeesReadList employees of a company
Get EmployeeReadGet a single employee
List PayrollsReadList payrolls for a company
Get PayrollReadGet a single payroll with totals

Example prompts

  • List all active employees in my Gusto company with their departments and emails.
  • Show my company’s processed Gusto payrolls for this quarter with their pay periods and totals.