所有代理商都隸屬於品牌 (商家、機構或群組)。建立代理程式之前,請先建立品牌。品牌純粹是為了方便管理,可協助您將相關聯的代理程式分組。
將測試人員新增至代理程式
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' }"
Python
endpoint_url = (BASE_ENDPOINT + 'testers') body = { "agentId": agentId, "phoneNumber": msisdn } response = authed_session.post(endpoint_url, data=json.dumps(body))
列出代理程式的測試人員
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`"
Python
endpoint_url = (BASE_ENDPOINT + 'testers?' + 'agentId=' + agentId) response = authed_session.get(endpoint_url)
擷取測試人員的狀態
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`"
Python
endpoint_url = (BASE_ENDPOINT + testerId + '?agentId=' + agentId) response = authed_session.get(endpoint_url)
刪除測試人員
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`"
Python
endpoint_url = (BASE_ENDPOINT + testerId + '?agentId=' + agentId) response = authed_session.delete(endpoint_url)