The NIF or Número de Identificação Fiscal can be a confusing topic, especially when it comes to how to get one. There are different rules, which vary depending on where you’re Resident. Some non-residents applying for a NIF need a fiscal representative, or someone to act as an intermediary between them and Finanças. This is usually the case with people resident in the US, for example. Others, those resident in Portugal or the European Union
Source