Skip to content

User Update Integration

Setting up an API token for X-Faces to use

Section titled “Setting up an API token for X-Faces to use”

In the project settings, Other Settings tab, provide an APIToken variable, which will be used by X-Faces for accessing the endpoint for user updates.

In order for X-Faces to fetch the necessary information about the updated user you need to do the following:

  1. Prepare a payload.

  2. Send it to the specified endpoint.

Receiving request from X-Faces about the updated user

Section titled “Receiving request from X-Faces about the updated user”

Next you need to provide an endpoint from which it will be possible for us to get the data:

  1. During user creation, provide user_data_url field with a full URL of an endpoint using which X-Faces will be able to fetch the update data for this user.
  1. On the X-Faces board find Project Settings tab and click it.

    Project settings location
  2. Click on Other Settings tab.

    Other settings location
  3. Create an APIToken variable and provide it with a value.

    API Token variable sample
User update workflow

This API provides an endpoint to POST the update about the user. It returns the response to the POST request. Our system then makes a GET request to fetch the data for the specified user.

POST https://api.x-faces.xyz/v1/user/notify

{
"p_uuid": string uuid,
"external_id": string,
"updated_fields": array ["field1", "field2", ... ] // optional
}
  • p_uuid – uuid string identifier of your project, in which the user is registered.

  • external_id – user identifier in the external (your) system.

  • updated_fields – optional parameter, which fields need to be updated.

You need to add a token header with the value received from an x-faces representative.

Server JSON responses are wrapped as follows:

{
"result": bool,
"message": string
}
  • result - whether the recognition of the bank card was launched successfully.
  • message - optional message accompanying the result.

"result": true - the payload was successfully processed and the user was marked for update.

"result": false - an error occurred while processing payload.

"message": "Access denied" - auth token passed in the headers is incorrect.

"message": "Invalid payload" - endpoint received a payload that’s not corresponding with a schema.

"message": "User does not exist" - user with the specified external_id does not exist for the specified project.

GET user_data_url

We will take the APIToken variable from your project’s settings, Other Settings tab.

We expect to receive a payload of the following structure:

{
"field1": ...,
"field2": ...,
...
}