Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import requests
- payload = 'username=myusername&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)
- if resp.status_code == 200:
- resp_json = resp.json()
- print resp_json['loginStatus']
- print resp_json['sessionToken']
- else:
- print "Request failed."
- URLFetch[" https://identitysso.betfair.com/api/certlogin", {"StatusCode", "Headers", "Content"}, "Headers" -> {"X-Application" -> "nilostep", "Accept" ->,"application/json"}, "Parameters" -> {"Username" -> "myusername", "Password" -> "mypassword"}];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement