Register TOTP
This API generates a QR code and secret key that allows the user to register their authenticator app (e.g., Google Authenticator, Authy) for TOTP-based second-factor authentication.
🔑Header Parameters
| Header | Type | Description | Example |
|---|---|---|---|
x-api-key | string | API key for authorization | {{x-api-key}} |
📦Request Body Schema
| Field | Type | Required | Description | Example/ENUM |
|---|---|---|---|---|
| user_id | string | Yes | Unique Client Code (UCC) assigned to the user | "UCC123456" |
| otp | string | Yes | The Temporary token from Verify OTP API | "{{forgot_password_token}}" |
| api_key | string | Yes | The API key provided by SynapseWave for authentication. | x-api-key |
| app_name | string | No | The name of the app to be set in the Authenticator apps (Default: "Registered in system"). | "Wave 3.0" |
| source | string | Yes | The source of the user request: WEBAPI (for web applications), MOBILEAPI (for mobile applications). | "MobileAPI" |
🟢Success Response - 200 OK
| Field | Type | Description | Example |
|---|---|---|---|
| status | string | Indicates the status of the API call | "success" |
| code | string | Internal Response code | "s-101" |
| message | string | A message confirming successful TOTP registration. | "QR Code Generated" |
| data | object | Contains the TOTP details necessary for registration. | See below Data object info |
📘 Data Object Field Info
| Field | Type | Description | Example |
|---|---|---|---|
| qrImg | string | Base64 or URL string of the TOTP QR image to be scanned. | "data:image/png;base64,... or <a class="external-link" href="https://example.com/totp.png" rel="nofollow">https://example.com/totp.png</a>" |
authSecret | string | TOTP setup key (secret) to be manually entered if needed. | "JBSWY3DPEHPK3PXP" |
| userID | string | The User ID (UCC) for whom the TOTP was registered. | "UCC123456" |
👉 Next Step : Verify TOTP
📱 Scan the QR code and add the account to your authenticator app.
✅ Then call Verify TOTP to:
- Confirm that TOTP codes are being generated correctly.