title: Encoding betfair API bot login details
body: <p>I'm in the early stages of writing a bot for Betfair, and have got the basics of logging in, getting prices etc down, but I am concerned about security of the login I am making. In the <code>API-NG</code> <a href="https://api.developer.betfair.com/services/webapps/docs/display/1smk3cen4v3lu3yomq5qye0ni/Non-Interactive+%28bot%29+login" rel="nofollow">tutorial</a> (in the <code>Certificate Login Interface Details</code> section) they mention:</p>
  
  <pre><code>Please note:  The username and password values should be encoded when
      making the login request.
  </code></pre>
  
  <p>But what does that mean exactly, encoded how?</p>
  
  <p>Currently I'm just following the tutorial Python example with:</p>
  
  <pre><code>payload = 'username=myusername&amp;password=password'
  headers = {'X-Application': 'SomeKey', 'Content-Type': 'application/x-www-form-urlencoded'}
  
  resp = requests.post('https://identitysso.betfair.com/api/certlogin', data=payload,
  cert=('client-2048.crt', 'client-2048.key'), headers=headers)
  </code></pre>
  
  <p>but does this mean my user and password are being sent insecurely?</p>