diff --git a/lib/Verification.php b/lib/Verification.php index beb3592..bf80cda 100644 --- a/lib/Verification.php +++ b/lib/Verification.php @@ -43,6 +43,11 @@ public static function retrieve_by_phone_number($phone_number, $options = null) public static function submit_verification($phone_number, $verification_code, $options = null) { $params = ['code' => $verification_code]; + + if (!empty($options['verify_profile_id'])) { + $params['verify_profile_id'] = $options['verify_profile_id']; + } + self::_validateParams($params); $url = '/v2/verifications/by_phone_number/' . urlencode($phone_number) . '/actions/verify'; @@ -50,4 +55,4 @@ public static function submit_verification($phone_number, $verification_code, $o $obj = \Telnyx\Util\Util::convertToTelnyxObject($response->json, $opts); return $obj; } -} \ No newline at end of file +}