Resident ID and Spanish Student Visa

Hi everyone!

I am Geraldine from the Philippines! I just arrived in Casablanca a few days ago and currently doing part-time teaching work to stay afloat! My plan is to stay in Casablanca for a few months while traveling in different parts of the country and then after, to go to Spain on a student visa before the end of the year.

Hence, I need advice on getting a student visa to Spain while I am here in Morocco.

Does the Spanish Embassy process student visa applications for foreigners? I am a Philippines passport holder and here in Morocco on a 90-day visa-free entry. Do I need a resident ID in Morocco first? Will having a residence ID allow me to apply for Spanish student visa? I tried emailing the Spanish Embassy but did not get a response. And their hotline is in French/Spanish, which I do not understand.

Everyone's advice will be much appreciated.

i think you must applied for visa student from your main country