OAuth 2.0
For marketplace apps and third-party integrations that need to access SyncBooks data on behalf of organizations.
Client Credentials Flow
Use this flow for server-to-server integrations where your app acts on behalf of a single organization.
1
Register your app in the Developer Portal to get client_id and client_secret
2
Request an access token from the token endpoint
3
Use the access token in API requests (expires in 1 hour)
4
Request a new token when it expires (no refresh token needed)
Token Request
POST /oauth/token
curl -X POST https://api.syncbooksapp.com/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "app_abc123def456",
"client_secret": "secret_xyz789...",
"scope": "invoices:read invoices:write customers:read"
}'Response
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "invoices:read invoices:write customers:read"
}Using the Token
API Request with OAuth Token
curl https://api.syncbooksapp.com/api/v1/invoices \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."Available Scopes
Request only the scopes your app needs:
invoices:readinvoices:writecustomers:readcustomers:writepayments:readpayments:writeproducts:readproducts:writeexpenses:readexpenses:writereports:readaccounts:readwebhooks:manageToken Expiry & Renewal
- Access tokens expire after 1 hour (3600 seconds)
- There is no refresh token — simply request a new access token
- Cache the token and reuse it until it expires
- Check for 401 responses to detect expired tokens