Authentication
Authentication is how an integration proves its identity to the eCourtDate API. It is how the system knows which agency the caller represents and that it is authorized to access that agency's data. Without authentication, the API would have no way to verify who is making a request.
eCourtDate uses the OAuth2 Client Credentials flow for API authentication. This grants the application a Bearer token (think of it as a temporary password the API issues after proving identity with the Client ID and Client Secret). This token is included with every request, and it expires after a set period. When it expires, simply request a new one using the same credentials.
Obtaining API Credentials
- Log in to the eCourtDate Console.
- Navigate to APIs.
- Create or locate the API client to retrieve the
client_idandclient_secret.
Requesting an Access Token
Exchange the credentials for an access token:
curl -X POST https://staging.api.ecourtdate.com/oauth/token \
-H "Content-Type: application/json" \
-d '{
"client_id": "{client_id}",
"client_secret": "{client_secret}",
"grant_type": "client_credentials"
}'
Response (201)
{
"access_token": "{access_token}",
"token_type": "Bearer"
}
Using the Token
Include the access token in the Authorization header of every API request:
Authorization: Bearer {access_token}
Multi-Agency Access
If the API client has access to multiple agencies, specify which agency to operate under by adding the agency_reference query parameter to the requests:
GET /v1/clients?agency_reference=demo
Verifying Access
To confirm the token is valid and check which agency it is connected to, call:
GET /v1/settings
A successful response indicates the token is active and properly scoped.