Hello. Can I suggest that you speak with the people or company to ask them how they intend to employ you. Self employed or will they pay your social security and the type of contract you can expect. To obtain your SS number you will as stated below need your NIE (consider residency) your passport and a recent copy that shows that you are registered on the padron (Town hall census) a little help from your would be employer would help like something telling the SS office that you will be employed. Then to your relevant local office with a big smile and as much Spanish as you can conjure up. Do not accept no as an answer and stand your ground. If you are lucky you will get a nice person at the counter who will assist you. Hope this has been helpful.