저는 symfony 응용 프로그램에서 Twilio-PHP를 사용하고 있습니다. Vresh Twilio Bundle을 사용하고 있습니다. 내 계정에서 SMS 메시지를 다음과 같이 검색하고 있습니다.Twilio-php - 메시지를 매개 변수로 필터링하는 방법?
$twilio = $this->container->get('twilio.api');
$messages = $twilio->account->messages
이렇게하면 계정에있는 모든 메시지의 목록을 가져옵니다. API 호출 시점에서이를 필터링하거나 특정 방향으로 만 메시지를 검색하거나 특정 날짜 이후에 필터링 할 수 있기를 원합니다. Twilio docs에서
는
$params = array('DateSent' => '2017-10-20');
$messages = $twilio->account->messages->read($params);
사용하는 예제가있다 ...하지만 read()
방법은 나를 위해 존재하지 않습니다.
[Symfony\Component\Debug\Exception\UndefinedMethodException]
Attempted to call an undefined method named "read" of class "Services_Twilio_Rest_Messages".
누구든지 Twilio에서 메시지를 가져 오는 방법을 조언하고 통화 시점의 매개 변수로 필터 할 수 있습니까?
고마워, 나는 그것을 시도 할 것이다. 내 요구 사항에 따라 날짜 별 필터링이 잘되어야합니다. – fistameeny