BEIJING — China on Thursday ridiculed but did not exactly deny an article in The New York Times detailing how Chinese intelligence agents eavesdropped on cellphone conversations President Trump had with friends in hopes of gaining insights into the administration’s policies.

A spokeswoman for China’s Ministry of Foreign Affairs, Hua Chunying, suggested that “some people in the United States” were competing for “the Academy Award for Best Original Screenplay,” and even used a familiar Trump trope, warning the newspaper that it risked being called “fake news.”

She went on to warn that the most secure way to avoid telephone intercepts was not to use “any modern communication devices.”

Almost certainly prepared for questions about the matter, Ms. Hua seemed to be enjoying the opportunity to discuss the article’s details. She even offered a plug for a Chinese competitor of the iPhones that Mr. Trump favors — to the apparent dismay of his security advisers.