title: RCurl, basic authentication with API key
body: <p>I used to use RCurl, to grab the data that needs login. Now I have to grab the data using api key (as well as userid,password) and it needs a basic authentication (Radian6 api : <a href="http://socialcloud.radian6.com/docs/read/Getting_Started" rel="nofollow noreferrer">http://socialcloud.radian6.com/docs/read/Getting_Started</a>) </p>
  
  <p>If it doesn't need an authentication, the code will be something like..</p>
  
  <pre><code>getURL("https:// address", userpwd="id:pswd", httpauth = 1L)
  </code></pre>
  
  <p>but I have no idea how to plug in api key for authentication. So far I was able to find examples written in python or Java but haven't found R example yet. Can anyone point me to the right direction? I'm wondering how I can use RCurl for basic authentication and how I can use a token to grab the data. (fyi, this is how python works :<a href="https://stackoverflow.com/questions/3576201/urllib2-authentication-with-api-key">Urllib2 authentication with API key</a>)</p>
  
  <p>Any advice will be very appreciated!</p>