get_api_key function

Get API key from R environment variable.