Passer au contenu principal
GET
/
projects
/
{slug}
/
config
Get project configuration
curl --request GET \
  --url https://faces.app/api/v1/projects/{slug}/config \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://faces.app/api/v1/projects/{slug}/config"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://faces.app/api/v1/projects/{slug}/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://faces.app/api/v1/projects/{slug}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://faces.app/api/v1/projects/{slug}/config"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://faces.app/api/v1/projects/{slug}/config")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://faces.app/api/v1/projects/{slug}/config")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "config": {
    "cardsSlidesPerView": 1.25,
    "cardsBackgroundColor": "<string>",
    "cardsBackgroundImage": "<string>",
    "theme": {
      "fontFamily": "<string>",
      "radius": "<string>",
      "colors": {
        "default": {
          "background": "<string>",
          "foreground": "<string>",
          "card": "<string>",
          "card-foreground": "<string>",
          "primary": "<string>",
          "primary-foreground": "<string>",
          "secondary": "<string>",
          "secondary-foreground": "<string>",
          "muted": "<string>",
          "muted-foreground": "<string>",
          "accent": "<string>",
          "accent-foreground": "<string>",
          "destructive": "<string>",
          "destructive-foreground": "<string>",
          "border": "<string>",
          "input": "<string>",
          "card-border": "<string>",
          "chart-1": "<string>",
          "chart-2": "<string>",
          "chart-3": "<string>",
          "chart-4": "<string>",
          "chart-5": "<string>"
        },
        "dark": {
          "background": "<string>",
          "foreground": "<string>",
          "card": "<string>",
          "card-foreground": "<string>",
          "primary": "<string>",
          "primary-foreground": "<string>",
          "secondary": "<string>",
          "secondary-foreground": "<string>",
          "muted": "<string>",
          "muted-foreground": "<string>",
          "accent": "<string>",
          "accent-foreground": "<string>",
          "destructive": "<string>",
          "destructive-foreground": "<string>",
          "border": "<string>",
          "input": "<string>",
          "card-border": "<string>",
          "chart-1": "<string>",
          "chart-2": "<string>",
          "chart-3": "<string>",
          "chart-4": "<string>",
          "chart-5": "<string>"
        }
      },
      "headingFontFamily": "<string>"
    },
    "tokens": {
      "palette": [],
      "fonts": []
    }
  }
}
{
"error": "<string>",
"hint": "<string>"
}

Autorisations

Authorization
string
header
requis

API key with "faces_" prefix. Create one at Settings > Developers.

Paramètres de chemin

slug
string
requis

Réponse

Project configuration

config
object
requis

Project-level settings stored in project.config.json, including the shared design system. Color token names must start with --; font token names with --font-.