إلغاء مفتاح API
curl --request DELETE \
--url https://api.truthlocks.com/v1/api-keys/{id} \
--header 'X-API-Key: <api-key>'const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/api-keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/api-keys/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/api-keys/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}مفاتيح API
إلغاء مفتاح API
إلغاء مفتاح API
DELETE
/
v1
/
api-keys
/
{id}
إلغاء مفتاح API
curl --request DELETE \
--url https://api.truthlocks.com/v1/api-keys/{id} \
--header 'X-API-Key: <api-key>'const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/api-keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/api-keys/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/api-keys/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}استخدم معرف سجل المفتاح، وليس الرمز السري. يؤدي الإلغاء إلى تعطيل المصادقة المستقبلية باستخدام تلك البيانات الاعتماد. قم بتحديث عمليات التكامل إلى مفتاح آخر مصرح به قبل إلغاء مفتاح لا يزالون يستخدمونه.

