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
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 yourredirect_uri:
state parameter matches what you sent. Then exchange the code for a token.
Step 4 — Exchange the code
client_secret.
Response
Step 5 — Call the API
Pass the access token as a Bearer token:Next steps
- PKCE in depth — verifier generation, challenge derivation, and security rationale
- Consent screen — what the user sees and how to customize it
- Token introspection — validate tokens server-side
- FAQ — scopes, expiry, refresh tokens