Skip to main content
HASP supports OAuth 2.1 with PKCE for third-party applications that need to act on behalf of an agent. This is the recommended integration path for any application that will be installed by multiple organizations.

Step 1 — Register your application

In the developer console (Developer Console → Applications → New Application), enter:
  • Display name — shown on the consent screen
  • Client type — choose Public (PKCE-only, no client secret) or Confidential (client secret issued)
  • Redirect URIs — the exact callback URLs your app will use
After registering, copy your Client ID (hasp_app_<ulid>). If you registered a confidential client, save the Client Secret (hasp_cs_live_...) immediately — it is shown only once.

Step 2 — Build the authorization URL

Generate a PKCE code verifier and challenge, then redirect the user:
authorization_details must be a JSON array, URL-encoded in the actual request (e.g., %5B%7B%22type%22%3A%22hasp.data.read%22%7D%5D). The authorize endpoint requires at least one valid RAR grant; omitting authorization_details returns invalid_request. The application’s detail page in the developer console includes a live URL builder and code snippets in curl, JavaScript, Python, and PHP.

Step 3 — Handle the callback

After the user approves (or denies), HASP redirects to your redirect_uri:
Verify the state parameter matches what you sent. Then exchange the code for a token.

Step 4 — Exchange the code

Public clients omit client_secret.

Response

Step 5 — Call the API

Pass the access token as a Bearer token:

Next steps