The Communication Security and Surveillance Act Article 29

If any one of the following conditions is met when conducting surveillance on other people's communications, it is not punishable:1. It is conducted pursuant to the law.2. Employees of telecommunications enterprises and those who set up public telecommunications networks and postal enterprises conducted the surveillance based on the objective of providing public telecommunications, public telecommunications networks or postal services in accordance with the relevant laws.3. The person conducting the surveillance is one of the parties in communication, or has obtained consent from one of the parties in communication, and the conduct is not for illegal purpose.
中文原文 通訊保障及監察法第29條
監察他人之通訊,而有下列情形之一者,不罰:
一、依法律規定而為。
二、電信事業、設置公眾電信網路者或郵政事業人員基於提供公共電信、公眾電信網路或郵政服務之目的,而依有關法令執行。
三、監察者為通訊之一方或已得通訊之一方事先同意,而非出於不法目的。

English translation for reference only; the Chinese text prevails. Not legal advice.