Getting Started
Step-by-step guide to integrating with AgentOnboard
Getting Started
Follow this guide to integrate your service with AgentOnboard.
1. Sign up as a partner
Create a partner account and submit your service for approval. Once approved, you receive a partner key.
2. Install the SDK
npm install @agentonboard/sdk3. Verify session tokens
When an AI agent calls your API, it sends a session token. Pass that token and your partner key to verify:
import { verify } from "@agentonboard/sdk";
const result = await verify(
process.env.AGENTONBOARD_PARTNER_KEY!,
sessionToken
);
if (result.ok) {
// Token is valid — grant access
// result.email is the user's email
} else {
// Token is invalid — deny access
// result.error has the reason
}Function signature
function verify(
partnerKey: string,
sessionToken: string,
apiUrl?: string
): Promise<VerifyResult>| Argument | Description |
|---|---|
partnerKey | Your partner key from the AgentOnboard dashboard |
sessionToken | The session token the agent sent with the request |
apiUrl | Optional. Defaults to https://api.ao.aawej.in |
Response
type VerifyResult = {
ok: boolean;
email?: string;
error?: string;
};| Field | Description |
|---|---|
ok | true if the token is valid |
email | The user's email (only when ok is true) |
error | Error message (only when ok is false) |
4. Handle the request
When result.ok is true, use result.email to identify the user and grant access to your service.
When result.ok is false, reject the request. Check result.error for the reason.
5. Test your integration
Use the AgentOnboard dashboard to create test session tokens and verify your integration works end to end.