Cybersecurity expert creates open-source 'NIE Bot' to book residency appointments

Head of Spanish police foreigner ID services: “We have appointments that can be booked every day”

A Spanish police station in Barcelona (by Gerard Escaich Folch)
A Spanish police station in Barcelona (by Gerard Escaich Folch) / Cristina Tomàs White

Cristina Tomàs White | Barcelona

May 3, 2022 12:47 PM

Talk to any group of foreigners living in Spain and more than a few are likely to tell you that getting their residency paperwork in order was not a straightforward process because appointments for NIEs, TIEs, and other IDs and documents are not always readily available.

How many there are will depend on a number of factors, including province of residence (demand in Barcelona is notoriously high), the specific kind of document needed, country of origin (EU, non-EU, UK, and now Ukraine), as well as the time of the day and month of the year.

Appointments ‘can be booked every day’

“We have appointments that can be booked every day,” Francisco Javier Fernández Caballero, the head of foreigner ID services at the Spanish police station on Rambla Guipúscoa in Barcelona, insisted when he spoke with Catalan News. “They are made available at random hours within a 12-hour time frame. Our peak work levels are from November to Christmas with re-entry authorizations.”

Despite this, it’s not uncommon for people to end up paying to secure highly sought-after ‘cita previa’ appointments. While some internet cafés used to book them for as low as €20, almost all of the ones Catalan News reporters have inquired at have since stopped doing so. Now people tend to resort to law firms or other companies that help with immigration services as well as questionable online businesses. 

Carlos Prieto, the top Spanish government official in the province of Barcelona, told Catalan News in December 2021 that paying for this service isn’t necessarily illegal if there’s a receipt for it - which is not always the case - but, like Fernández Caballero, said it shouldn’t be necessary as, according to him, appointments are available every day. 

And although Catalan News reporters have not found any appointments through the government website in the province of Barcelona since late 2021, when they first began reporting on this issue, Prieto adamantly denied that doing so was "impossible." Through an ad on Wallapop, however, they did find someone who for €50 took two days to book a date in Igualada in two months' time, as well as two lawyers who promised to take a week to book one for €150.

Listen on Apple Podcasts Listen on Google Podcasts Listen on Spotify

Dozens upon dozens of people have told Catalan News similar stories. Antonia, from Bulgaria, complained of paying “€90 for a service that is supposed to be public” after being unable to get an appointment on her own for two months. “I come from a country where the average wage is around €400, so you can imagine what a €90 fee for their service cost me,” she lamented. 

Bert, from the United States, said his lawyer had even told him there was a “mafia” and gave him a number to call. “I tried for months and months and months, I don't remember how many months, but three or four before I had to resort to just paying somebody,” he said. “It was €50 and I had an appointment the next day. It doesn't affect Spanish people so I don't think the Spanish government cares.”

According to the head of foreigner ID services, however, “people should avoid this because if they’re patient they’ll be able to find one” through official means.  

Firewalls

Police have put measures in place to prevent people from booking appointments in bulk and then reselling them, Fernández Caballero explained. But a cybersecurity expert, C., who wishes to remain anonymous told Catalan News that these might not be the most effective.

For one, if the online appointment booking system detects the same IP address is used more than three times, it blocks the user from going any further. This could also prevent larger families from being able to book appointments for each member. 

“All someone would have to do is get a VPN, get a cloud computer on Amazon Web Services or Google Cloud Projects or Microsoft Azure... or they can literally just use their phone cellular connection to get themselves an extra IP address,” C. explained. “It’s not hard to do.”

The same is supposed to happen with phone numbers and email addresses.

“It’s not that hard to get a new phone number, is it? You can just register one in Google Voice,” C. countered. “It's not that much of a difficulty to get around.”

An open-source ‘NIE bot’

Being unable to get a ‘cita previa’ through the government website put C.'s livelihood at risk as he needed a NIE to open a bank account and start working in Barcelona. 

“Trying to get my NIE done was like trying to book tickets to a rock concert that sells out within minutes,” C. said. “It’s completely opaque and doesn’t tell you what you need to do” in languages other than Spanish. But this situation also encouraged him to get creative with his programming skills. 

“I kind of decided I’m going to need to be superhuman to fill out all the stuff in a decent amount of speed to actually get it through and that’s what prompted me to write the bot,” he told Catalan News. “The bot does everything a normal user would do but at superhuman speed.” It usually manages to get appointments within the hour. 

C. is convinced that what he calls “wannabe lawyers” use similar programs to charge exorbitant fees for the service. Because of this, and fully aware of the many people out there who are still in need of a ‘cita previa’, he released an open-source version of the tool that is now available to all.

“I figured the fact that lawyer types would be competing against a free and easy program for getting appointments would also make it a hard sell for those looking to profit,” he reasoned.