Skip to main content
Add Face URL API
Updated over 9 months ago

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

POST /oloid-users/{primaryID}/login-url

URL Parameters

primaryID: A unique identifier for the organization. Example: AZ-123

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


curl --location 'https://api.oloidpreview.com/oloid-users/AZ-123/login-url' \
--header 'Authorization: <AdminToken>' \
--header 'Content-Type: application/json' \
--data '{
"ReturnPath": "/login",
"QueryParams": {
"returnUrl": "credentials/faces",
"section": "face"
},
"PrimaryID": true,
"SendLinkToUser": false
}'

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.

Example Response

{
"message": "Link sent successfully",
"data": {
"LoginUrl": "https://api.oloidpreview.com/oloid-s3/QYTQEeZ"
}
}

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.

Did this answer your question?