1. Just go to http://steamcommunity.com/dev/apikey
    Sign in with your steam account and it will ask you for a domain, here you can just enter your server's IP and submit the form. After that you will be given an API Key.
     
  2. need to be login on steam on server or no ? for api key work?