Is allowed to pray in a bathroom if I want to pray in secret? Is the same bathroom and toilet?
Praise be to Allah, the Lord of the Worlds; and blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
Prayer in the toilet/bathroom is forbidden. Reported Ahmed, Ibn Majah, Abu Dawood the narration of Abu Sa'eed Al-Khudri from the Prophet that he said, "The entire earth is Masjid (Place for prayer), except the toilet and the graveyard".
Reported Tirmidhi, Ibn Majah the narration of Ibn Umar that he said: "The Prophet prohibited performing prayer at seven places. He counted 'the bathroom' among them".
It should be known that a Muslim ought not to hide his prayer, for it is worship, and his worship is for none other than Allah, the Creator of heavens and earth. And He is The Creator and Sustainer of the Muslims. Hence, there is nothing of His worship to be hidden out of shyness. So, don't hide your prayer, unless there is a pressing necessity. And when you feel such an emergency, then look for another place, not the toilet.
Allah knows best.
You can search for fatwa through many choices