Skip to main content

Authorization

FACIA API relies on API keys for request authentication. You can conveniently view and manage your API keys in the FACIA Merchant Portal under account settings. Our API utilizes bearer authentication through Access Tokens and client-secret key authentication. It follows standard HTTP Status Codes and supports JSON/form-data Request and Response bodies. This comprehensive documentation thoroughly details each parameter, ensuring clarity and straightforward implementation.

Using the credentials created during registration, authentication can be performed based on:

  1. Access Token
  2. Client-secret key

Get Access Token

For authorization, Facia's SDKs require an Access Token with an expiration period of eight hours. You can obtain the Access Token using the following API through two methods:

  1. Email and Password
  2. Client-ID and Client-Secret Key

Endpoint

POSThttps://api.facia.ai/request-access-token



Run in Postman

Request Samples:

1. Email and Password:

//POST /request-access-token HTTP/1.1
//HOST : https://api.facia.ai/
//Content-Type: application/json

{
"email": "your_email_here",
"password": "your_password_here"
}

2. Client-ID and Client-Secret Key:

//POST /request-access-token / HTTP/1.1
//HOST : https://api.facia.ai/
//Content-Type: application/json

{
"client_id": "your_client_id_here",
"client_secret": "your_client_secret_key_here"
}

Request Parameter

ParametersDescription
emailRequired: Yes
Type: String
passwordRequired: Yes
Type: String
client-idRequired without email: Yes
Type: String
client-secretRequired without email: Yes
Type: String

Sample Response


{
"status": true,
"message": "token",
"result": {
"data": {
"token": "your_token_here"
}
}
}


Get Client Credentials

Using the credentials created during registration, make a request to the /get-client-credentials endpoint to obtain your unique client_id and client_secret key. The client_secret key (your unique API key) can be included in the headers to avoid generating a new access token every time.

Endpoint

POSThttps://api.facia.ai/get-client-credentials



Run in Postman

Request Samples:


//POST /get-client-credentials HTTP/1.1 bearer token
//HOST : https://api.facia.ai/
//Content-Type: application/json

{
"email": "your_email_here",
"password": "your_password_here"
}

Request Parameter

ParametersDescription
emailRequired: Yes
Type: String
passwordRequired: Yes
Type: String

Sample Response


{
"status": true,
"message": "credentials",
"result": {
"data": {
"client_id": "your_client_id",
"client_secret": "your_client_secret"
}
}
}