Skip to content

Conversation

@abhix2112
Copy link
Contributor

This contribution introduces SmartAadhaar Toolkit, a complete package for Aadhaar verification within ServiceNow.
It is not just a Script Include — it combines:

Script Include wrapper (SmartAadhaar) for OTP-based, demographic, document, and status verification

RESTMessageV2 integration for secure API calls

Connection & Credential Alias (aadhaar_api) for endpoint + credential management

Why this is useful
Aadhaar verification is a common need for organizations onboarding users in India. Instead of re-writing REST calls each time, this toolkit provides a drop-in, reusable utility that follows ServiceNow best practices:

🔒 Security: no hardcoded secrets, input validation, masking of Aadhaar numbers

⚡ Reliability: retry logic, exponential backoff, error handling

🧾 Compliance: session management, consent tracking hooks, audit logging

🛠️ Flexibility: endpoints configurable per provider, works with any UIDAI-approved gateway

Folder placement
Per the contributing guidelines, the snippet is placed under:

Server-Side Components/
REST Integrations/
Aadhaar Verification/
README.md
script.js

This location reflects that it is a REST integration toolkit (Script Include + RESTMessageV2 + Connection & Credential Alias) rather than a standalone Script Include.

How to test

Configure a Connection & Credential Alias: aadhaar_api with your provider’s base URL + credentials.

Run the sample Background Script calls from README.md:

sendOtp() → user receives OTP

verifyOtp() → returns eKYC data

verifyDemographic() → returns match score

getDocument() → fetches Aadhaar XML/PDF

checkStatus() → checks verification status

Security note

No Aadhaar number or OTP is logged (masked in logs).

No credentials are hardcoded (all stored in Connection & Credential Alias).

Explicit consent tracking supported via helper params.

Copy link
Contributor

@am-shakeel am-shakeel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@am-shakeel am-shakeel merged commit 2f5b8cd into ServiceNowDevProgram:main Oct 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants