You need a licence for both sea/shore and continental fishing, so inland. In all Autonomous regions there is legislation in place about the reciprocal recognition of licences issued in other EU countries or in another Autonomous Region and the ways to accredit your capability might vary, but a licence and in most cases, relevant third party insurance is required everywhere in Spain.
In Andalucia, to get a licence for continental fishing, you must first be registered as an accredited ´Pescador´ on the Registro de Caza y Pesca Continental.
For Andalucia:
To be accredited, you must follow a course and do an exam, or have experience, proof of that could be a licence, issued in another EU country, but it would have to be recognised as valid for accreditation here in Spain.
Info on course for Andalucia:
Info on exam from Andalucia:
Once you have managed that and you´ve got your Tarjeta de Pescador, to get a licence is quite simple. They can be issued for 1, 3 or 5 years.
Read about it for Andalucia
Info from Andalucia on how to apply onlinefor a licence for sea/shore fishing, with a digital certificate. Or download forms if you don’t have one installed on your computer.
In all other regions, go look for the Consejeria de Medio Ambiente of your Comunidad Autonoma.
For shore and sea fishing the procedure is much simpler. Simply fill out application form, accompanied by copy of valid ID, pay the ´tasa´ and voila.
On the Canary Islands you can either apply online, through the ´sede electronica´ or in person, you need to contact the responsible Concejeria de Agricultura y Pesca of your region. More info:
Decree re saltwater fishing in Valencia: fishing with rod from coast included, appealed by Valencia Fishing Federation, but no definite ruling from Supreme Court yet. See article 14 on how and where to apply.
Application forms for Valencia:
For Murcia, ´pesca fluvial´ so in rivers and lakes, info
and for sea fishing