Authentication Overview
RBIH APIs use a comprehensive security framework based on JWT (JSON Web Token) authentication with additional security measures including digital signatures, IP whitelisting, and state-of-the-art encryption protocols.
Security Framework
All RBIH APIs require proper authentication and follow industry-standard security practices to ensure data protection and regulatory compliance. The authentication system is designed to support both sandbox and production environments with different token validity periods.
JWT Token Authentication
Token Validity
- Sandbox Environment: 6 hours
- Production Environment: 12 hours
Required Headers
All API requests must include these authentication headers:
Authorization: Bearer <jwt_token>
Content-Type: application/json
client-id: <your_client_id>
provider: <provider_code>
Prerequisites
Before integrating with RBIH APIs, ensure you have:
- API Credentials - Obtained from RBIH onboarding process
- IP Whitelisting - Your server IPs registered with RBIH
- URL Whitelisting - Your callback URLs registered for webhook services
- Environment Access - Sandbox for testing, Production for live operations
Quick Start
1. Generate JWT Token
const jwt = require('jsonwebtoken');
function generateJWTToken(clientId, clientSecret, providerId) {
const payload = {
iss: clientId,
sub: 'api_access',
provider: providerId,
iat: Math.floor(Date.now() / 1000),
exp: Math.floor(Date.now() / 1000) + (6 * 60 * 60) // 6 hours for sandbox
};
return jwt.sign(payload, clientSecret, { algorithm: 'HS256' });
}
2. Make API Request
const response = await fetch('https://api.rbihapis.com/pan/verify', {
method: 'POST',
headers: {
'Authorization': `Bearer ${jwtToken}`,
'Content-Type': 'application/json',
'client-id': clientId,
'provider': '101'
},
body: JSON.stringify({
panNumber: 'ABCDE1234F',
nameToMatch: 'John Doe'
})
});
Next Steps
- JWT Token Setup - Detailed JWT implementation guide
- Digital Signatures - HMAC and PKI certificate setup
- Environment Configuration - Sandbox vs Production setup
- Security Best Practices - Security guidelines and recommendations