Register TOTP
This API allows a user to fetch the necessary details required to register for TOTP (Time-Based One-Time Password) as a second-factor authentication.
| 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 OTP sent to the user for registering TOTP | "1234567" |
| 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" |