LendWorksLendWorksDocs

OAuth Scopes

Granular permissions that control what data your app can read and write.

Overview

Scopes define the level of access your app requests from a LendWorks organization. Users see the requested scopes on the consent screen before approving installation. Request only the scopes your app needs — apps requesting excessive permissions are less likely to be approved by users or the marketplace review team.

Available Scopes

Leads

ScopeDescription
leads:readView leads, search, and filter by pipeline stage
leads:writeCreate, update, and manage lead pipeline stages

Applications

ScopeDescription
applications:readView lender applications and their statuses
applications:writeCreate and update lender applications

Lenders

ScopeDescription
lenders:readView lender directory and product details
lenders:writeCreate and update lender records and products

Funded Deals

ScopeDescription
funded-deals:readView funded deal records and amounts
funded-deals:writeCreate and update funded deal records

Commissions

ScopeDescription
commissions:readView commission records and summaries

Analytics

ScopeDescription
analytics:readAccess KPIs, pipeline analytics, and leaderboards

Automations

ScopeDescription
automations:readView automation templates and execution history
automations:writeTrigger and cancel automation instances

Pipeline

ScopeDescription
pipeline-stages:readView pipeline stage configuration

Custom Fields

ScopeDescription
custom-fields:readView custom field definitions

Contacts

ScopeDescription
contacts:readView contact records
contacts:writeCreate and update contacts

Documents

ScopeDescription
documents:readView and download documents
documents:writeUpload and manage documents

Webhooks

ScopeDescription
webhooks:manageCreate, update, and delete webhook subscriptions for your app

App Data

ScopeDescription
app-data:readRead from your app's per-org data store
app-data:writeWrite to your app's per-org data store

Profile

ScopeDescription
profile:readView the installing user's basic profile and organization info

Requesting Scopes

Include scopes as a space-separated string in the OAuth authorization URL:

GET https://auth.lend.works/oauth/authorize
  ?client_id=lw_app_xxxxxxxxxxxx
  &scope=leads:read leads:write webhooks:manage
  &...

Scope Validation

  • If your app requests a scope it hasn't registered, the authorization will fail with invalid_scope
  • If a user's role within their organization doesn't have access to certain resources, API calls may return 403 even with the correct scope
  • Scopes cannot be escalated after installation — the user must re-authorize to grant additional scopes

Best Practices

  • Request minimum scopes — Only ask for what your app actually needs. Users are more likely to install apps with fewer permission requests.
  • Explain why — Use your app description to explain why each scope is needed.
  • Separate read and write — If your app only needs to read data, don't request write scopes.
  • Add scopes incrementally — Start with minimal scopes and request more as your app's functionality grows. Users can re-authorize to grant additional scopes.
  • Handle scope errors — If an API call returns 403, check that your token has the required scope before assuming a bug.