Overview
This endpoint retrieves comprehensive organization details including authentication URLs, domain restrictions, email verification settings, Google SSO configuration, and credentials. Supports both JWT and public key authentication.
API Details
Authentication
Bearer JWT token for authentication
Your public key for authentication (alternative to JWT)
Either JWT token OR public key authentication is required. JWT authentication is preferred when available.
cURL - JWT Authentication
cURL - Public Key Authentication
JavaScript - JWT Authentication
JavaScript - Public Key Authentication
Python
curl -X GET https://api.authiqa.com/auth/organization-details \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"
Try It Out
Test the API by providing either JWT token or public key:
JWT token for authentication
Process Flow
Authentication
Try JWT authentication first (if Authorization header present)
Fallback to public key authentication (if X-Public-Key header present)
Validate authentication credentials
Retrieve user by authentication method
Account Resolution
Determine account type (parent/child)
For child accounts, fetch parent details
Verify account status and permissions
Data Collection
Gather organization details and settings
Collect authentication URLs
Retrieve Google SSO configuration
Prepare credentials for response
Usage Tracking
Increment retrieval counter
Update usage statistics (non-blocking)
Response Fields
Organization display name
Base URL for the organization
Authentication URLs for various flows (signin, signup, verify, etc.)
Whether widget is restricted to organization’s domain (default: true)
emailVerificationRequired
Whether email verification is required for new accounts (default: false)
Google SSO configuration with enabled status and client ID
Contains publicKey and jwtSecret for API authentication
Response Examples
{
"success" : true ,
"data" : {
"message" : "Organization details retrieved successfully" ,
"organizationName" : "Example Corp" ,
"organizationUrl" : "https://example.com" ,
"authUrls" : {
"signin" : "https://example.com/signin" ,
"signup" : "https://example.com/signup" ,
"verify" : "https://example.com/verify" ,
"reset" : "https://example.com/reset" ,
"update" : "https://example.com/update" ,
"resend" : "https://example.com/resend" ,
"successful" : "https://example.com/success"
},
"domainRestrictionEnabled" : true ,
"emailVerificationRequired" : false ,
"googleSsoConfig" : {
"enabled" : true ,
"clientId" : "123456789-abcdefghijklmnop.apps.googleusercontent.com"
},
"credentials" : {
"publicKey" : "APK_1234567890abcdef_1234" ,
"jwtSecret" : "your_jwt_secret_key"
}
}
}
{
"success" : false ,
"error" : {
"code" : "MISSING_PARENT_PUBLIC_KEY" ,
"message" : "public key is required"
}
}
{
"success" : false ,
"error" : {
"code" : "USER_NOT_FOUND" ,
"message" : "User not found"
}
}
Error Codes
Authentication Errors
MISSING_PARENT_PUBLIC_KEY - public key not provided
INVALID_PARENT_ACCOUNT - Parent account invalid
USER_NOT_FOUND - No user found for public key
URL Requirements
Required URLs All authentication URLs must be:
Accessible via HTTPS
Under organization’s domain
Properly configured for:
Sign in/up flows
Email verification
Password management
Success redirects
Domain Restriction
Domain Restriction Setting The API response includes a domainRestrictionEnabled boolean field that indicates whether the authentication widget is restricted to the organization’s domain:
When true (default): Widget only works on the organization’s domain
When false: Widget works on any domain (for testing purposes)
This setting helps control where the authentication widget can be used, providing security while allowing flexibility for testing.