Skip to content

Authentication

The Alleviate API uses Microsoft Entra ID (formerly Azure AD) for authentication. You’ll need to obtain an OAuth 2.0 access token using the Client Credentials flow.

Prerequisites

Before you can authenticate, you’ll need:

  1. Client ID (client_app_id) - Your application’s unique identifier
  2. Client Secret (client_secret) - Your application’s secret key
  3. Tenant ID (alleviate_tenant_id) - The Alleviate Azure AD tenant ID
  4. Debt Core App ID (debt_core_app_id) - Used for the API scope

Obtaining an Access Token

Use the OAuth 2.0 Client Credentials flow to obtain an access token:

Terminal window
curl -X POST "https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id={CLIENT_ID}" \
-d "client_secret={CLIENT_SECRET}" \
-d "scope=api://{DEBT_CORE_APP_ID}/.default"

Environment Credentials

Use the following values based on your target environment:

VariableSandboxProduction
alleviate_tenant_id8797fa3f-ba90-4187-97fb-6ab892ea903558797fa3f-ba90-4187-97fb-6ab892ea9035
debt_core_app_idaba793eb-f395-4f86-be59-7a7d0c1bfdb09060a1d0-da3b-4676-ad64-ff64465cce41
client_app_idProvided by your account managerProvided by your account manager
client_secretProvided by your account managerProvided by your account manager

Token Response

A successful authentication returns:

{
"token_type": "Bearer",
"expires_in": 3599,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6..."
}
FieldDescription
token_typeAlways “Bearer”
expires_inToken validity in seconds (typically 1 hour)
access_tokenThe JWT token to use for API requests

Using the Access Token

Include the access token in the Authorization header for all API requests:

Terminal window
curl -X POST "https://debt-core-api-sandbox.alleviate.com/graphql" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"query": "{ creditReport(id: \"123\") { id status } }"}'

Token Management Best Practices

  1. Cache tokens - Store the token and reuse until expires_in seconds pass
  2. Refresh proactively - Request a new token ~5 minutes before expiration
  3. Handle 401 errors - If you receive a 401, request a new token and retry
  4. Secure storage - Never expose client secrets in client-side code

Troubleshooting

Common Authentication Errors

ErrorCauseSolution
invalid_clientIncorrect client ID or secretVerify your credentials
invalid_scopeWrong scope specifiedUse the correct API scope
unauthorized_clientApp not authorizedContact Alleviate to grant permissions
expired_tokenToken has expiredRequest a new access token

Next Steps

Once you have authentication working:

  1. Review the Environments to select the right endpoint
  2. Follow the Full Enrollment Flow to make your first API calls