I am 27 weeks pregnancy I am not taking any pills. I feel ok and I dont like taking pills. Am I putting my baby in any danger?

Basic thoughts. If you are avoiding vitamins you need to understand some basics.The baby will extract the nutrients it needs from your body whether you take vitamins or not.That means it will strip your system of the very nutrients that keep your bones/body healthy/stable over your lifetime.Those vitamins are to preserve you as much as assure baby has access. Want problems & soft bones when old=keep avoiding them.
Doctors instructions. You did not mention what pills you are not taking. If your doctor gave you medication for some medical problem then it is best to take the medicine as directed. Since we do not know what medication you are referring to or what problem your doctor was treating we really can not comment further. Consider scheduling a follow up visit with your doctor and clarify the plan of care .
Yes. By not taking prenatal vitamins, especially folic acid, you do place the baby in some danger. Folic acid, for example, significantly reduces the risk of neural tube defects occurring in the developing fetus.
27w: no vitamins? Supplemental vitamins are generally necessary in pregnancy, and should be encouraged from your OB provider. There are some potential problems for your fetus if he/she does not receive certain nutrients via your diet alone. Ask your OB provider about which pre-natal vitamins to take. Your "feeling OK" does not mean your baby has what he/she needs. .