Overview
The Add Face URL API endpoint allows administrators to generate a unique login URL for users to upload or manage their facial recognition data. This document provides detailed information about the API request and response formats.Endpoint
URL Parameters
Headers
- Authorization: The administrator’s token required for authentication. Example: <AdminToken>
- Content-Type: Must be set to application/json.
Request Body
The request body should be a JSON object with the following fields:- ReturnPath (string): The path where the user should be redirected after the login process. Example: /login.
- QueryParams (object): An object containing key-value pairs of query parameters to be included in the login URL.
- returnUrl (string): The path to redirect to after successful login. Example: credentials/faces.
- section (string): The section of the user profile to be managed. Example: face.
- PrimaryID (boolean): Indicates whether the primary ID of the user is to be used. Example: true.
- SendLinkToUser (boolean): If set to true, the system sends the generated link to the user directly. Example: false.
Example Request
Response
The response is a JSON object containing a message and data fields.Response Body
- message (string): A confirmation message indicating the action was successful. Example: “Link sent successfully”.
- data (object): An object containing the generated login URL.
- LoginUrl (string): The generated URL for the user to login and manage their facial recognition data. Example: “https://api.oloidpreview.com/oloid-s3/QOQEeZ”.
Example Response
Error Handling
In case of an error, the response will be a JSON object with an error description and possibly an error code. Clients should handle these errors appropriately based on the status code and the error description provided.Security Considerations
- The Authorization header must contain a valid admin token.
- Ensure HTTPS is used to protect the confidentiality and integrity of the request.