A hairpin is not a good choice, a coat hanger would be much better but… shut off the water to the toilet. There may be a shut off under the tank on the feed line. If not shut off the main valve to the house/apartment.
The problem is not the toilet, it is the drain, or sewer, line from the toilet that is blocked. Unless the trap of the toilet is blocked.
If there is a bathroom or sinks, showers, tubs above you, they may be/should be blocked also.
You need a plumber that does sewer line blockage work.
Quality Water Associates