تساعد عملية التحقق من الهوية في ضمان أن المحادثات بين عملائك ووكلاء الدعم تظل خاصة. كما تساعد أيضًا في منع انتحال الهوية.

يمكن تفعيل التحقق من الهوية عن طريق توليد HMAC.

يختلف المفتاح المستخدم لتوليد HMAC لكل ويدجت ويب ويمكن نسخه من: صناديق الوارد -> الإعدادات -> التهيئة -> التحقق من الهوية -> انسخ الرمز المميز المعروض هناك.

\
![](https://app.chatwoot.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCT2hicXdVPSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--9c7c1953b95b1b9907e77e07bb0b1f132183eaa4/CleanShot%202026-06-24%20at%2010.40.38@2x.png)

يمكنك توليد HMAC بلغات برمجة مختلفة كما هو موضح أدناه.

## توليد HMAC

### PHP

```
<?php

$key = '<webwidget-hmac-token>';
$message = '<identifier>';

$identifier_hash = hash_hmac('sha256', $message, $key);
?>
```

### جافاسكريبت (Node.js)

```
const crypto = require('crypto');

const key = '<webwidget-hmac-token>';
const message = '<identifier>';

const hash = crypto.createHmac('sha256', key).update(message).digest('hex');
```

### روبي

```
require 'openssl'
require 'base64'

key = '<webwidget-hmac-token>'
message = '<identifier>'

OpenSSL::HMAC.hexdigest('sha256', key, message)
```

### إليكسير

```
key = '<webwidget-hmac-token>'
message = '<identifier>'

signature = :crypto.hmac(:sha256, key, message)

Base.encode16(signature, case: :lower)
```

### Golang

```
package main

import (
    "crypto/hmac"
    "crypto/sha256"
    "encoding/base64"
    "encoding/hex"
)

func main() {
  secret := []byte("<webwidget-hmac-token>")
  message := []byte("<identifier>")

  hash := hmac.New(sha256.New, secret)
  hash.Write(message)
  hex.EncodeToString(hash.Sum(nil))
}
```

### بايثون

```
import hashlib
import hmac
import base64

secret = bytes('<webwidget-hmac-token>', 'utf-8')
message = bytes('<identifier>', 'utf-8')

hash = hmac.new(secret, message, hashlib.sha256)
hash.hexdigest()
```

##