This endpoint facilitates the addition of domains to be associated with your API key, enhancing the security of token usage. By specifying authorized domains, you restrict token usage exclusively to these designated domains, thereby fortifying the security measures surrounding your API key.
You can add your domains under sites
field.
curl --location --request POST 'https://core.getfaceage.com/api/v1/business/{business_id}/access' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer your_secret_key' \
--data-raw '{
"sites": [
"https://first-domain.com",
"https://second-domain.app"
]
}'
list of your domains. This field is required.
Type: Array
Upon successful adding, the endpoint returns a JSON object with your business info and the list of your accesses details, including its unique identifier (id), your sites,and etc.
{success} Response 200
{
"status": true,
"data": {
"id": 9823,
"user_id": 5078,
"name": "my beauty salone",
"main_domain": "Mybeauty-salone.com",
"site": "https://www.Mybeauty-salone.com",
"country_id": 22,
"business_size": "medium",
"token": "Wdroi9WuX8klSeb6zbN0",
"status": "active",
"created_at": "2024-03-16T11:41:41.000000Z",
"updated_at": "2024-03-16T11:43:00.000000Z",
"access_list": [
{
"id": 309,
"business_id": 9823,
"site": "https://first-domain.com",
"created_at": "2024-03-17T06:48:23.000000Z",
"updated_at": "2024-03-17T06:48:23.000000Z"
},
{
"id": 310,
"business_id": 9823,
"site": "https://first-domain.com",
"created_at": "2024-03-17T06:48:23.000000Z",
"updated_at": "2024-03-17T06:48:23.000000Z"
}
]
}
}
{warning} Response 401 : Invalid Business
{
"status": false,
"message": "Id is not valid"
}
{warning} Response 401 : Unauthorized
{
"message": "Unauthenticated."
}