テスターの管理

すべてのエージェントはブランド(ビジネス、組織、グループ)に属しています。エージェントを作成する前に、まずブランドを作成する必要があります。ブランドは、関連するエージェントをグループ化するのに役立つ純粋な組織構造です。

エージェントにテスターを追加する

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 サンプルからの抜粋です。