Skip to content

Instantly share code, notes, and snippets.

@juanriaza
Last active August 29, 2015 14:09
Show Gist options
  • Save juanriaza/3252ad6803aed6251a33 to your computer and use it in GitHub Desktop.
Save juanriaza/3252ad6803aed6251a33 to your computer and use it in GitHub Desktop.
Librecon API
import requests
mobile_code = 'XXXX'
req = requests.post('https://mobile.librecon.io/secret/api/v1/auth/code', data={'code': mobile_code})
auth_hash = req.json()['data']['assistant']['hash']
"""
{u'data': {u'assistant': {u'address': u'---',
u'cellPhone': u'---',
u'company': u'Scrapinghub',
u'country': u'SPAIN',
u'email': u'---',
u'hash': u'---',
u'id': u'---',
u'interests': u'Casos de \xe9xito,Conferencias,Talleres',
u'lastName': u'Riaza',
u'location': u'VITORIA',
u'name': u'Juan',
u'picUrl': u'https://mobile.librecon.io/contenidos/media/image/entity/assistant/id/908/section/landscape/',
u'picUrlCircle': u'https://mobile.librecon.io/contenidos/media/image/entity/assistant/id/908/section/circle/',
u'position': u'Software Developer',
u'postalCode': u'---'}},
u'status': u'success'}
"""
req = requests.get(
'https://mobile.librecon.io/secret/api/v1/assistants',
headers={'Authorization': auth_hash})
print req.json()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment