Seamlessly integrate 5N ID into your system using our REST API or TypeScript/JavaScript SDK and build trust from the first step.
Before You Begin
Request 5N ID access
Your client account to access the API and SDK.
Get Authorized
Use your Client ID and Client Secret to obtain OAuth2 access tokens via client_credentials flow. For API requests, include the Bearer token in the Authorization header. The SDK handles this automatically.
Overview
5N ID allows youto integrate secure identity verification directly into your website, application, or mobile app. Our technology ensures seamless customer onboarding and Credentials compliance while serving as the unified identity layer for the Canton ecosystem
Key Features:
5N ID acts as the single source of truth for user identity across the Canton network, enabling consistent and verifiable user data across applications.
User identity information is securely stored and managed via smart contracts, ensuring tamper-proof records and auditability.
Simple integration using either the REST API with standardized HTTP requests and responses, or the TypeScript/JavaScript SDK for type-safe, developer-friendly integration.
Designed to work seamlessly with Canton's privacy-focused blockchain infrastructure, enabling compliant data sharing between permissioned nodes.
If you have any questions or need further assistance, please don't hesitate to contact our support team.
Guide
This guide helps you integrate your system with the 5N ID Credentials application. Choose between using the REST API directly or the TypeScript/JavaScript SDK for a more developer-friendly experience. Both use OAuth2 client_credentials authentication for secure access.
01
Contact Us
Fill in the application form to initiate the process. After your account is created, you'll receive an email with your login credentials and temporary password.
You will receive a unique Client ID and Client Secret. Use them to obtain OAuth2 access tokens for authenticating your API requests, or pass them directly to the SDK which handles token management automatically.
04
Choose Integration Method
Choose how you want to integrate:
REST API: Use HTTP requests directly for maximum control;
SDK: Install @fivenorth/id-sdk for type-safe, simplified integration with automatic token management;
Both methods use the same OAuth2 authentication and provide the same functionality.
05
Front-End Adjustments
You must update your front-end to support:
Triggering Credentials flow after user actions;
Displaying verification status to users;
Handling errors and responses visually.
06
Test the Integration
Use the sandbox environment to:
Test API/SDK authentication;
Simulate Credentials flows;
Validate all error scenarios;
Ensure that all functionality works end-to-end before going live.
07
Complete Integration
Once integration is tested and verified, your system will be ready to manage users and initiate Credentials processes in production.
API Overview
Use this section to understand the core technical specifications of the 5N ID API before diving into specific endpoints.
Current API Version
v1.0.0
Update Frequency
Real-time sync after every Credentials action
Base URL
https://id.devnet.cantonloop.com/api/v1
Data Formats
All requests and responses use JSON
Authentication
All requests must be authenticated using OAuth2 client_credentials flow with Bearer tokens
SDK Reference
SDK Benefits
The 5N ID SDK provides a type-safe, developer-friendly wrapper around the 5N ID API:
Automatic OAuth2 token management (acquisition, caching, and refresh)
Type-safe methods with full TypeScript support
Network configuration (devnet/mainnet) with automatic URL resolution
Comprehensive error handling with specific error types
Simplified API calls without manual token management
Package Information
Key information about the SDK package:
Package name: @fivenorth/id-sdk
Available on npm: https://www.npmjs.com/package/@fivenorth/id-sdk
The SDK uses the same OAuth2 client_credentials flow as the API.
All SDK methods correspond to API endpoints and provide the same functionality.
The SDK automatically handles token expiration and retries failed requests.
To integrate using the SDK, follow the steps below.
1. Installation
Package@fivenorth/id-sdk
Description
Install the 5N ID SDK package from npm to get started with type-safe, easy-to-use methods for interacting with the 5N ID API.
Installation
Install using npm:
npminstall @fivenorth/id-sdk
Or using yarn:
yarnadd @fivenorth/id-sdk
Or using bun:
bun add @fivenorth/id-sdk
2. Initialization
MethodidSdk.connect()
Description
Create and authenticate a connection to the 5N ID service. The SDK automatically handles OAuth2 token management, including token acquisition, caching, and refresh.
Parameters
clientId – your Client ID (required)
clientSecret – your Client Secret (required)
network – network environment: "devnet" or "mainnet" (optional, defaults to "mainnet")
Network Configuration
The SDK supports two networks: mainnet (production, default) and devnet (development). URLs are automatically resolved based on the network.
Returns void on success. Indicates that a proposal was successfully created for the user.
4. Get All Institution Credentials
Methodconnection.getCredentials()
Description
Retrieve all approved credentials that your institution has access to, with pagination support. Returns credentials with freshness status and metadata.
Parameters (optional)
offset – number of records to skip (default: 0)
limit – maximum number of records to return (default: 10)
Example
Get all credentials with default pagination:
// Get first page (default: offset=0, limit=10)const allCredentials =await connection.getCredentials();console.log(allCredentials.items);// Array of credentialsconsole.log(allCredentials.pagination);// { offset, limit, total }
Get credentials with custom pagination:
// With paginationconst page2 =await connection.getCredentials({ offset:10, limit:20,});
Response
Returns a CredentialsListResponse object containing an array of credentials and pagination information.
For additional details including request headers, path parameters, and cURL examples, see the corresponding endpoint in the API Reference section.
6. Generate Verification Link
Methodconnection.generateVerificationLink()
Description
Generate a short-lived verification link for a specific credential. The link can be shared with third parties to verify the credential status.
Parameters
contractId – the contract ID of the specific credential (required)
Example
Generate a verification link:
const verification =await connection.generateVerificationLink({ contractId:'008cb3c4e71260967ef...',});console.log(verification.verificationUrl);// URL to shareconsole.log(verification.token);// Token for status checking
Response
Returns a GenerateVerificationLinkResponse object containing verificationUrl and token.
7. Generate Verification Links (Batch)
Methodconnection.generateVerificationLinksBatch()
Description
Generate verification links for multiple credentials in a single request. Useful for bulk verification operations. Maximum 100 requests per batch. Each item is processed independently - partial failures are returned in the response.
Parameters
requests – array of verification link requests (required, max 100 items)
Returns a BatchGenerateVerificationLinkResponse object containing an array of results. Each result contains either a verification link response or an error for failed requests.
8. Check Verification Status
Methodconnection.checkVerificationStatus()
Description
Check the verification status for a verification token. This is a public endpoint (no authentication required) and is typically used by third parties who received a verification link.
Parameters
token – the verification token from the verification URL (required)
Example
Check verification status (public endpoint, no authentication required):
const status =await connection.checkVerificationStatus('verification-token');console.log(status.status);// 'strong', 'moderate', 'weak', etc.console.log(status.color);// 'green', 'amber', 'red'console.log(status.isActive);// booleanconsole.log(status.credentialData);// Original credential metadata
Response
Returns a VerificationStatusResponse object containing status, color, isActive flags, credential data, and other verification information.
For additional details including path parameters and cURL examples, see the corresponding endpoint in the API Reference section.
9. Get Human Score
Methodconnection.getHumanScore()
Description
Retrieve the human score calculation for a specific party. The human score is a composite metric that evaluates identity verification based on account age, social metrics, email consistency, and provider connections. Returns a total score (0-100+), confidence level, score breakdown, earned badges, and detailed metrics.
Parameters
partyId – the party ID of the user to get the human score for (required)
Returns a HumanScoreResult object containing totalScore, confidenceLevel, breakdown (score components), badges (earned badges array), and details (detailed metrics including accountAges, socialMetrics, emailConsistency, providerCount, allUserInfo, and allTokenClaims).
Response Example
Returns the human score calculation for the authenticated user. Example:
{"totalScore":91,"confidenceLevel":"high","breakdown":{"accountAgeScore":35,"socialMetricsScore":16,"emailConsistencyScore":20,"providerCountScore":20},"badges":[{"id":"account-age-veteran","name":"Veteran","description":"Verified account older than 10 years","level":"platinum","category":"Account Age"},{"id":"email-perfect","name":"Perfect","description":"Same email across all providers","level":"platinum","category":"Email Consistency"},{"id":"provider-all-star","name":"All-Star","description":"Connected 5+ verification providers","level":"platinum","category":"Provider Count"},{"id":"verified-status-verified","name":"Verified","description":"Has at least one verified account","level":"gold","category":"Verified Status"},{"id":"developer-beginner","name":"Beginner","description":"1+ public repositories","level":"bronze","category":"Developer Activity"}],"details":{"accountAges":[{"provider":"GITHUB","ageInDays":4129},{"provider":"DISCORD","ageInDays":99},{"provider":"TWITTER","ageInDays":82}],"socialMetrics":[{"provider":"GITHUB","ageInDays":4129,"email":"user@example.com","accountCreatedAt":"2014-09-27T08:47:46.000Z","githubRepos":1,"githubFollowers":6,"followingCount":5},{"provider":"DISCORD","ageInDays":99,"email":"user@example.com","accountCreatedAt":"2025-10-09T08:13:32.713Z","verified":true},{"provider":"TWITTER","ageInDays":82,"email":"@username","accountCreatedAt":"2025-10-25T18:11:26.000Z","followersCount":8,"followingCount":1,"postsCount":0,"verified":false}],"emailConsistency":{"uniqueEmails":["user@example.com"],"consistencyScore":20},"providerCount":5,"allUserInfo":[],"allTokenClaims":[]}}
Note
For additional details including request headers and cURL examples, see the corresponding endpoint in the API Reference section.
10. Resolve Credentials
Methodconnection.resolveCredentials()
Description
Resolve credentials using a single method. The behavior depends on the options provided: use `q` (email/username) for forward lookup or `partyId` for reverse lookup. Forward lookup finds credentials when you have a user's email or username. Reverse lookup finds all credentials associated with a specific party ID. This is a unified method that automatically determines whether to perform forward or reverse lookup based on the provided options.
- q – email address or username for forward lookup (case-insensitive)
- partyId – party ID for reverse lookup (e.g., "party::12200d35764b9b490251e499af00626b54516c4f3f1c021c2eb72bf7c72f38662cb0")
Note: Provide exactly one of q or partyId, but not both.
Example
Example:
importidSdkfrom'@fivenorth/id-sdk';const connection =await idSdk.connect({ clientId:'YOUR_CLIENT_ID', clientSecret:'YOUR_CLIENT_SECRET', network:'mainnet'// or 'devnet'});// Forward lookup: Find credentials by email or usernameconst result1 =await connection.resolveCredentials({ q:'user@example.com'});console.log('Found credentials:', result1.credentials);console.log('Party ID:', result1.credentials[0]?.partyId);// Reverse lookup: Find all credentials by party IDconst result2 =await connection.resolveCredentials({ partyId:'party::12200d35764b9b490251e499af00626b54516c4f3f1c021c2eb72bf7c72f38662cb0'});console.log('All credentials for this party:', result2.credentials);
Response
Returns a ResolveCredentialsResponse object containing an array of credentials. Each credential includes partyId, userId, email, username, kycProvider, contractId, and metadata.
Forward lookup (q option): Search is case-insensitive and matches against both email and username fields
Reverse lookup (partyId option): Returns all credentials associated with the party ID across all providers
Only returns credentials that the institution has approved access to
Returns empty array if no matches found
Can return multiple credentials if user has multiple providers
Throws an error if both q and partyId are provided, or if neither is provided
Note
The SDK also provides convenience methods `resolve(query)` and `reverseResolve(partyId)` for simpler use cases. For additional details including request headers, query parameters, and cURL examples, see the corresponding endpoint in the API Reference section.
Join Us in Shaping the Future of Credentials
Call for collaboration, partnerships, or community engagement.