Bearer Token Authentication
Bearer tokens provide a straightforward way to authenticate API requests. Include your token in the Authorization header of each request.Getting your bearer token
- Log into your dashboard
- Navigate to API Settings
- Generate a new API token
- Copy and securely store your token
Using bearer tokens
Include your bearer token in the Authorization header:OAuth 2.0 Authentication
OAuth 2.0 provides secure authorization for applications that need to access user data. We support multiple OAuth flows:- Authorization Code flow: For web applications accessing their own data
- Connected Accounts flow: For third-party platforms accessing customer data on their behalf
OAuth flow overview
Register your application
Register your application in the developer dashboard to get your client ID and secret.
Redirect user for authorization
Redirect users to our authorization endpoint with your client ID and desired scopes.
Handle the callback
After user authorization, we’ll redirect to your callback URL with an authorization code.
Exchange code for access token
Exchange the authorization code for an access token using your client credentials.
Refreshing tokens
Access tokens expire after a certain period. Use the refresh token to obtain new access tokens:OAuth Connected Accounts
OAuth Connected Accounts enable third-party platforms to access ProConvey on behalf of their customers, similar to Stripe Connect. This allows platforms to integrate ProConvey functionality while maintaining proper authorization and data isolation.How Connected Accounts Work
Connected Accounts use a combination of machine-to-machine authentication for the platform and OAuth authorization for customer consent:- Platform Authentication: Third-party platforms use machine-to-machine tokens to authenticate themselves
- Customer Authorization: Customers authorize the platform to access their ProConvey account via OAuth
- API Access: Platforms make API requests using the
ProConvey-Accountheader to specify which customer account to act on behalf of
Setting Up Connected Accounts
Platform Registration
Register your platform to receive client credentials for machine-to-machine authentication.
Contact our partnership team to register your platform and receive your
client_id and client_secret.Customer Authorization Flow
Direct customers to authorize your platform to access their ProConvey account:
Token Exchange
Exchange the authorization code for access tokens that represent the connected account:
ProConvey-Account Header
TheProConvey-Account header is required when making API requests on behalf of a connected account. This header:
- Identifies which customer account the request should act on behalf of
- Ensures proper data isolation between different customer accounts
- Enables audit logging of platform actions
The
ProConvey-Account header value is the connected_account_id returned during the token exchange process.Token Management for Connected Accounts
Connected account tokens work similarly to standard OAuth tokens but include additional metadata:Token Refresh
Token Security
Scopes
OAuth tokens can be limited to specific scopes to control access levels. Connected Accounts support granular permissions for fine-grained access control:Standard Scopes
| Scope | Description |
|---|---|
read | Read access to user data |
write | Write access to create and modify data |
admin | Administrative access to account settings |
Granular Scopes (Connected Accounts)
For Connected Accounts, you can request more specific permissions:| Scope | Description |
|---|---|
read:cases | Read access to case data |
write:cases | Create and modify case data |
read:quotes | Read access to quote information |
write:quotes | Create and modify quotes |
read:contacts | Read access to contact information |
write:contacts | Create and modify contact data |
read:documents | Read access to documents |
write:documents | Upload and modify documents |
read:reports | Read access to reports and analytics |
Security Considerations for Connected Accounts
When implementing Connected Accounts, follow these security best practices:Token Storage and Management
Access Control
- Regularly audit connected account permissions and usage
- Implement IP allowlisting for production integrations
- Monitor for unusual API usage patterns that might indicate compromise
- Provide customers with visibility into platform access and usage
Data Isolation
The API automatically enforces data isolation by validating that the
ProConvey-Account header corresponds to an organization the authenticated platform has permission to access.Audit and Compliance
All Connected Account API usage is automatically logged for audit purposes, including:- OAuth authorization events
- Token exchanges and refreshes
- API requests with associated connected account IDs
- Permission changes and revocations
Rate Limiting
Connected Accounts are subject to rate limiting based on:- Per-platform limits across all connected accounts
- Per-connected-account limits for individual customer protection
- Scope-specific limits for different types of operations
Error handling
Common authentication errors and how to handle them:401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
Cause: Valid credentials but insufficient permissionsSolution: Check that your token has the required scopes for the endpoint
Token expired
Token expired
Cause: Access token has exceeded its expiration timeSolution: Use your refresh token to obtain a new access token
Invalid connected account
Invalid connected account
Cause: The
ProConvey-Account header references an invalid or inactive connected accountSolution: Verify the connected account ID is correct and the connection is still activeDomain mismatch
Domain mismatch
Cause: The connected account doesn’t match the API domain being accessedSolution: Ensure you’re making requests to the correct API domain for the connected account
Connection revoked
Connection revoked
Cause: The customer has revoked authorization for your platformSolution: Re-initiate the OAuth flow to obtain new authorization from the customer
Best practices
General Authentication
Connected Accounts
Testing authentication
Standard Authentication
You can test your authentication setup using our API explorer or by making a simple request to the/me endpoint:
Connected Accounts Testing
Test Connected Account access by making a request with theProConvey-Account header:
Use our sandbox environment for testing Connected Accounts integration before going live. Contact our support team to set up sandbox credentials.