There have been numerous instances this year in which a white person called the police on black people engaging in regular activities.

“I felt insulted,” Mr. Okafor said of the encounter. “I felt violated. To me, his behavior suggested that, one, because we were people of color we were a threat to their safety, and, two, because we are people of color we can’t afford to live in that type of apartment complex.”

He added: “It’s the Upper East Side. It’s considered to be one of the wealthy parts of Manhattan. It’s a nice apartment.”

The neighbor similarly accosted a white couple just hours after the encounter with Mr. Okafor.

Janah Reynolds, who is visiting New York for the holidays with her husband and two sons, was renting an apartment on the first floor of the building through Airbnb. After dropping their bags at the apartment on Wednesday, Ms. Reynolds and her husband went out while her mother-in-law stayed with the children.

When Ms. Reynolds and her husband returned to the building, she said, the same man refused to let them in, telling them it was illegal for them to rent an apartment for just a few nights. (Many New Yorkers illegally rent out their apartments on Airbnb, though it is not clear whether this particular rental was legal.)

Ms. Reynolds, who posted a video of their heated confrontation as a comment on Mr. Okafor’s Facebook post, said that she and her husband waited more than an hour before the man finally relented and let them into the apartment where their children were waiting. She said they called the police multiple times, but officers never came.

Mr. Okafor said that he has sublet an apartment in the building since last December. His video shows the man repeatedly asking him which apartment he lived in, information that Mr. Okafor refused to give.