إدارة المشاركين في الاختبار

ينتمي جميع العملاء إلى علامة تجارية (نشاط تجاري أو مؤسسة أو مجموعة). قبل إنشاء وكيل، عليك أولاً إنشاء علامة تجارية. العلامات التجارية هي لأغراض تنظيمية فقط، وهي تساعدك في تجميع الوكلاء المرتبطين معًا.

إضافة مختبِر إلى وكيل

cURL

curl -v -X POST "https://businesscommunications.googleapis.com/v1/testers" \
  -H "Content-Type: application/json" \
  -H "User-Agent: curl/business-messaging" \
  -H "`oauth2l header --json rbm-developer-service-account-credentials.json businesscommunications`" \
  -d "{
    'agentId': '$AGENT_ID',
    'phoneNumber': '$MSISDN'
  }"
هذا الرمز هو مقتطف من نموذج RBM Management API.

Python

endpoint_url = (BASE_ENDPOINT + 'testers')

body = {
  "agentId": agentId,
  "phoneNumber": msisdn
}

response = authed_session.post(endpoint_url, data=json.dumps(body))
هذا الرمز هو مقتطف من نموذج RBM Management API.

عرض قائمة بمختبِري الوكيل

cURL

curl -v -X GET "https://businesscommunications.googleapis.com/v1/testers?agentId=$AGENT_ID" \
  -H "User-Agent: curl/business-messaging" \
  -H "`oauth2l header --json rbm-developer-service-account-credentials.json businesscommunications`"
هذا الرمز هو مقتطف من نموذج RBM Management API.

Python

endpoint_url = (BASE_ENDPOINT +
  'testers?' +
  'agentId=' + agentId)

response = authed_session.get(endpoint_url)
هذا الرمز هو مقتطف من نموذج RBM Management API.

استرداد حالة أحد المختبِرين

cURL

curl -v -X GET "https://businesscommunications.googleapis.com/v1/$TESTER_ID?agentId=$AGENT_ID" \
  -H "User-Agent: curl/business-messaging" \
  -H "`oauth2l header --json rbm-developer-service-account-credentials.json businesscommunications`"
هذا الرمز هو مقتطف من نموذج RBM Management API.

Python

endpoint_url = (BASE_ENDPOINT +
  testerId +
  '?agentId=' + agentId)

response = authed_session.get(endpoint_url)
هذا الرمز هو مقتطف من نموذج RBM Management API.

حذف مختبِر

cURL

curl -v -X DELETE "https://businesscommunications.googleapis.com/v1/$TESTER_ID?agentId=$AGENT_ID" \
  -H "User-Agent: curl/business-messaging" \
  -H "`oauth2l header --json rbm-developer-service-account-credentials.json businesscommunications`"
هذا الرمز هو مقتطف من نموذج RBM Management API.

Python

endpoint_url = (BASE_ENDPOINT +
  testerId +
  '?agentId=' + agentId)

response = authed_session.delete(endpoint_url)
هذا الرمز هو مقتطف من نموذج RBM Management API.