FaceSign
Reference

Languages

Learn how to retrieve and use supported languages for FaceSign verification sessions.

FaceSign supports multiple languages for the verification interface, allowing you to provide a localized experience for users worldwide. The /langs endpoint returns all available languages that can be used in your verification sessions.

Supported languages

LanguageCode
English (Default)en
French (Francais)fr
German (Deutsch)de
Russianru
Spanish (Espanol)es
Indonesian (Bahasa Indonesia)id
Norwegian (Norsk)no
Portuguese (Portugues)pt
Italian (Italiano)it

Language object

PropertyTypeDescription
idstringLanguage code (ISO 639-1 format).
titlestringHuman-readable language name in the language itself.

Get supported languages

GET /langs

Returns a list of all languages supported by FaceSign. Use these language codes when creating sessions to specify which languages should be available to users.

Request
curl https://api.facesign.ai/langs \
  -H "Authorization: Bearer sk_test_..."
Request
import Client from '@facesignai/api'
import { FSNodeType } from '@facesignai/api'

const client = new Client({
  auth: 'sk_test_...',
})

const { langs } = await client.langs.retrieve()

// Use in session creation
const { session, clientSecret } = await client.session.create({
  clientReferenceId: 'user_123',
  langs: ['en', 'es', 'fr'],
  defaultLang: 'en',
  flow: {
    nodes: [
      { id: 'start', type: FSNodeType.START, outcome: 'end' },
      { id: 'end', type: FSNodeType.END }
    ],
    edges: [{ id: 'e1', source: 'start', target: 'end' }]
  }
})
Request
import facesignai

client = facesignai.Client(
    auth='sk_test_...',
)

response = client.langs.retrieve()
langs = response['langs']

# Use in session creation
session_response = client.session.create(
    client_reference_id='user_123',
    langs=['en', 'es', 'fr'],
    default_lang='en',
    flow={
        'nodes': [
            {'id': 'start', 'type': 'start', 'outcome': 'end'},
            {'id': 'end', 'type': 'end'}
        ],
        'edges': [{'id': 'e1', 'source': 'start', 'target': 'end'}]
    }
)
Response
[
    { "id": "en", "title": "English" },
    { "id": "de", "title": "German" },
    { "id": "ru", "title": "Russian" },
    { "id": "fr", "title": "French" },
    { "id": "es", "title": "Spanish" },
    { "id": "id", "title": "Indonesian" },
    { "id": "no", "title": "Norwegian" },
    { "id": "it", "title": "Italian" }
]

Using languages in sessions

Basic language configuration

When creating a session, you can specify which languages should be available and set a default language:

Configure session languages
const { session, clientSecret } = await client.session.create({
  clientReferenceId: 'user_123',
  langs: ['en', 'es', 'fr'], // Available languages for this session
  defaultLang: 'en', // Default language if user's preference isn't available
  flow: [
    { id: 'start', type: FSNodeType.START, outcome: 'end' },
    { id: 'end', type: FSNodeType.END }
  ]
})

Best practices

FaceSign provides an endpoint to fetch the list of currently supported languages. It is recommended to retrieve this list from the API and store it locally -- for example, in your database or an in-memory cache. To keep your local list up to date, listen for the settings.langs webhook event, which notifies your application of any changes to the supported languages. When this event is received, fetch the updated languages list from the API and update your local storage.

This approach ensures your application always has the most current set of available languages, minimizing API calls and keeping your user experience consistent even as available languages change.

Next steps

On this page