How can i authenticate a user from python for Jawbone UP.With valid credentials is it possible to authenticate from python
Asked
Active
Viewed 694 times
1 Answers
1
email ='your email id'
pwd = 'your password'
data = urllib.parse.urlencode({'email': email, 'pwd':pwd, 'service': 'nudge'})
data = data.encode('utf-8')
request = urllib.request.Request("https://jawbone.com/user/signin/login")
# adding charset parameter to the Content-Type header.
request.add_header("Content-Type","application/x-www-form-urlencoded;charset=utf-8")
f = urllib.request.urlopen(request, data)
#print(f.read().decode('utf-8'))
j=(f.read().decode('utf-8'))
b=json.loads(j)
now json object b contains all data about user like name ,weight,etc.......

midhun0003
- 603
- 1
- 10
- 26
-
I am getting invalid redirect URI error.. I am using https://10.210.14.104:18080/jsp/homepage.jsp as redirect URI.. How can I solve this error ? please help – Amit Sep 05 '14 at 10:54
-
URI must match one of the URI prefixes defined when setting up API access. – midhun0003 Sep 08 '14 at 06:57
-
I have configured this http://10.210.14.104:18080/deviceoauth in Jawbone site while registering the APP and I am redirecting to same URL but with two parameters http://10.210.14.104:18080/deviceoauth?oAuthInProgress=true&selectedTab=3. Is adding parameters is the problem ? – Amit Sep 08 '14 at 07:03