Overview
The GetBill API uses OAuth 2.0 for authentication. This ensures secure access to your data while allowing you to integrate with third-party applications safely.Getting Started
1. Create an OAuth Client
First, you need to create an OAuth client in your GetBill dashboard:- Log in to your GetBill account
- Navigate to Company → API Client Management
- Click Create New Client
- Choose the appropriate grant type and scopes for your use case
- Save your Client ID and Client Secret securely
Admin Access Required: Only company administrators can create and manage OAuth clients. If you don’t see the API Client Management option, contact your company administrator to grant you admin access.
2. Choose Your Grant Type
The API supports multiple OAuth 2.0 grant types:- Client Credentials
Best for: Server-to-server communication, background jobs, automated systemsThis grant type is ideal when your application needs to access its own resources without user interaction.
Scopes
Scopes define what your application can access. Request only the scopes you need:Read access to debt information
Create, update, and delete debts
Read access to followup information
Create and update followups
Access to reports and analytics
Read company profile and statistics
Read user information within your company
Access webhook logs and statistics
Token Response
A successful token request returns:Using Access Tokens
Include the access token in theAuthorization header for all API requests:
Token Refresh
Access tokens expire after 1 hour. Use the refresh token to get a new access token:Security Best Practices
Secure Storage
Store client secrets and refresh tokens securely. Use environment variables or secure vaults.
HTTPS Only
Always use HTTPS for all API communications to protect tokens in transit.
Token Rotation
Implement automatic token refresh before expiration to avoid service interruptions.
Minimal Scopes
Request only the minimum scopes required for your application functionality.
Error Responses
Authentication errors return standard OAuth 2.0 error responses:invalid_client: Invalid client credentialsinvalid_grant: Invalid or expired authorization code/refresh tokeninvalid_scope: Requested scope is invalid or not allowedaccess_denied: User denied authorization
Next Steps
Once authenticated, explore these powerful API features:AI-Powered Workflows
Learn how to use Timeline IDs to automate collection with AI calls, emails, and SMS.
Make Your First Call
Follow our First API Call guide to start integrating.