Skip to main content
Every request to the LeadScout API must be authenticated. The API accepts two authentication methods: a session cookie set automatically by the web dashboard after login, and a Bearer JWT token intended for the mobile app and external integrations. Both methods resolve to the same user record and produce identical authorization behavior, so you can use whichever fits your client. When you use the LeadScout web dashboard, signing in sets a session cookie automatically. The browser sends that cookie with every API request — you do not need to set any headers manually. This method is not suitable for server-to-server or mobile integrations.

Bearer JWT token (mobile and integrations)

For programmatic access, obtain an access token for the LeadScout API audience and attach it to every request as an Authorization header.
LeadScout validates the token signature and audience on every request. Expired or tampered tokens are rejected with a 401 response.
You must request the token with the correct API audience for your environment. Tokens issued for a different audience will be rejected even if the signature is valid.

Obtaining a token

To obtain API access credentials for server-to-server or custom integrations, contact the LeadScout team. They will provide your client ID, client secret, and API audience values. Once you have those, exchange them for a bearer token using the OAuth 2.0 client credentials flow:

Making an authenticated request

Once you have a token, pass it in the Authorization header:

Error responses

401 Unauthorized

You receive a 401 when no credential is present or the provided token is invalid — for example, when the token is expired, the signature does not match, or the audience claim is wrong.

403 Forbidden

You receive a 403 when your credential is valid but your role or permissions do not allow the requested action. For example, a sales role user attempting to create a webhook (admin-only) will receive a 403.

Roles and permissions

The API enforces three roles with increasing authority:
Individual sales users can be granted extra capabilities — canManageProspects or canManageTags — by an admin or owner without changing their base role.