Skip to main content

Amani Web SDK


On server side you need to login with your credentials and get a token for next steps. This token should be used only on server side requests not used on Web SDK link.

curl --location --request POST '' // Change 'eu1' according to your region
--form 'username=""'
--form 'password="password"'

Here is an example of how the response look like:

"id": "8cd7...843c2",
"username": "",
"first_name": "YOUR_NAME",
"last_name": "YOUR_LASTNAME",
"phone": "532126...",
"refresh": "eyJhbG...5K3KWgQtAEiE",
"access": "eyJhbGciO...Kv_Rvf8rWE4", // Use this access token for subsequent requests
"groups": [
"id": 2,
"name": "Company Admin",
"permissions": [
"company_id": "dfc...9b520444",
"permissions": [

Create Profile

Get or Create a customer using the request below.

If there is no customer, new one is created.

if there is a customer already created with same id_card_number, it will be returned.

curl --location --request POST '' // Change 'eu1' according to your region
--header 'Authorization: Bearer use_your_access_token_here'
--form 'id_card_number="Customer_ID_Card_Number"' // (Required)
--form 'name="Customer Name"' // (Optional)
--form 'email="Customer Email"' // (Optional)
--form 'phone="Customer Phone"' // (Optional)

Here is an example of how the response look like:

"id": "6aff82cb-e91a-4df4-b9a3-d69de0be1a2e", // Prfile ID
"external_id": null,
"created_at": 1709651428,
"updated_at": 1715009755,
"last_status_update": 1715009755,
"name": "NAME",
"phone": null,
"email": null,

You can use this Profile ID to create a verification URL for customer.

curl --location --request POST '' \ // Change 'eu1' according to your region
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer use_your_access_token_here'
--data '{
"profile": "Profile ID"
}' // Profile ID returned in the previous step
"short_url": ""

Redirect User to Web SDK

After the short url has been created, you can redirect the user to Amani Web SDK using this url with the parameters below.

pid: 'be1a2e01HX796.....Z6HATGR0ZS' // Profile Token
server_url: '' // Server URL that will be used as a backend server. Change this according to your region
gl: false // Enable/Disable geolocation feature. Default: false
ln: 'en' // (Default is 'en')
rl: '' // User will ve redirected to this URL after verification steps are completed

You can check Supported SDK languages for more languages.

Uploading document

User will follow steps on the screen and upload the necessary documents. When all required documents uploaded, user will be redirected to return link you provided with status and error parameters.


Possible Error Codes

  • 401: Token is not valid
  • 404: User not found
  • 500: Server error
  • 1001: Couldnt find face in photo
  • 1002: Blur detected in photo
  • 1003: Glare detected in photo
  • 1004: Auto crop failure
  • 1005: Not supported document
  • 1008: This ID is not belong to this profile
  • 1009: Reserved for manual error code written by customer agent on Amani Studio
  • 1010: Browser not supported
  • 2001: Selfie did not match with ID
  • 2002: Selfie failed on liveness detection
  • 2003: Selfie failed on eye gaze detection
  • 3001: Document failed on liveness detection
  • 3002: Expired ID
  • 4001: Expired Document
  • 4002: Name on address document does not match with name on ID
  • 5001: Signature does not match with the signature on ID
  • 6001: Signature on the contract does not match with the signature on the ID