Authentication for the Faceki API is achieved through token-based authentication. To authenticate requests made to the API, you must include an API token in the Authorization of your requests.
For the GET method, the "Authorization" header should include "Bearer Token" followed by your parameters. which are "clientId" and "clientSecret". These parameters help to ensure that the request is valid and authorized.
By including the necessary authentication details in your requests, you can ensure that your requests are processed correctly and securely.
This API is used to generate tokens, this token is client-specific and used to authenticate client identity before performing operations in the system.
Method: GET
Authorization: Bearer Token
Parameter:
clientId *(mandatary)
clientSecret *(mandatory)
Each token will have a token refresh expiry of 5 minutes/ 3600 seconds.
*All Params are mandatary required
GEThttps://sdk.faceki.com/auth/api/access-token
Headers
Name
Type
Description
clientSecret*
String
clientSecret will be found in the integration section.
{"status": false,"message": "client id is required","statusCode": 422,"data": {}}
Response JSON format
Requests return a JSON object with the header:
// Content-Type: application/json
Responses return JSON with a consistent structure, except downloads.
You must make all your requests to the API over HTTPS and TLS 1.2, with Server Name Indication enabled. Any requests made over HTTP will fail.
Token authentication Codes
Authorization: Token token=<YOUR_API_TOKEN>
api_url='https://sdk.faceki.com/auth/api/access-token?clientId=7bsvancpl4tio60600pn6hnr58&clientSecret=1d5bssl48phc3vjfh5ljntkl9b2u6a0r80kit6vg08f9kpf70ch9'
curl -X GET $api_url
This code uses the fetch API to make a GET request to the API endpoint and returns a Promise that resolves to the response data. The console.log method is used to log the data to the console, and the console.error method is used to log any errors that may occur during the request.