Authenticate with staff credentials and access tokens.
curl --request POST \ --url https://bettersalespro.com/admin/api/login \ --data 'email=YOU@example.com' \ --data 'password=YOUR_PASSWORD'
Overview
Better Sales Pro’s partner API authenticates staff users. Successful login returns a random token stored on the staff record. Subsequent methods resolve the staff user with Authenticationi_api_model->get_staff_id($token).
OAuth 2.0 is not the public authentication mechanism for these endpoints. Do not send secrets in frontend JavaScript or documentation samples that are meant to run in browsers.
Login
POST/admin/api/login
email
string
required
Staff login email.
password
string
required
Staff password.
Using tokens
Pass token with each authenticated request (typically as a POST field). Invalid or missing tokens return:
{
"session_expired": "…"
}
Permissions
Many write operations also enforce Better Sales Pro module permissions (view/create/edit/delete). See Permissions.
Security best practices
- Store tokens server-side only
- Rotate credentials if a device is compromised
- Use HTTPS in production
- Grant staff the least privilege required
Was this page helpful?