Airgentic Help
Once Airgentic has configured your secure service, you can add the widget to your website or intranet. The embed code is almost identical to a standard (non-secure) widget, with two extra attributes that enable authentication.
Add the following <script> tag to any page where you want the Airgentic widget to appear:
<script
id="airgentic-script"
src="https://chat.airgentic.com/airgentic-1.4.js"
data-account-id="your_account_id"
data-service-id="your_service_id"
data-auth-mode="oidc"
data-auth-redirect-uri="https://intranet.yourorg.gov.au/callback"
></script>
Airgentic will provide your data-account-id and data-service-id values.
| Attribute | Description |
|---|---|
data-auth-mode="oidc" |
Tells the widget to require sign-in via your identity provider. If omitted, the widget runs in open (unauthenticated) mode and a secure service will reject all requests. |
data-auth-redirect-uri |
The URL your identity provider redirects users to after sign-in. This must exactly match one of the redirect URIs you registered in your identity provider and provided to Airgentic. |
The data-auth-redirect-uri (e.g. https://intranet.yourorg.gov.au/callback) is the page your identity provider sends users back to after they sign in. This can be:
Either way, the page at the callback URL must include the same Airgentic script tag. The widget detects the authentication callback automatically, completes the sign-in, and removes the temporary parameters from the address bar.
Note: The widget does not automatically redirect users back to a different page after authentication. Users remain on the callback page. For the best experience, use your main widget page as the callback URL so users are already where they want to be after signing in.
No custom server-side code is required on your end — the widget handles the entire callback process in the browser.
If the session expires, the user is prompted to sign in again.
For a more detailed explanation of this flow, see How Secure Authentication Works.
After adding the embed code:
If you see an error or the widget doesn't load, check that:
data-auth-redirect-uri exactly matches the redirect URI registered in your identity provider.If you need help, contact Airgentic support — see Contacting Airgentic.