Login to side
#1
Hey,

maybe a little off-topic but I hope you can help me or point me in the right direction. The page I created a plugin for has changed the site completely and with this the login procedure.
The sign-in url is something like https://app.example.com/users/sign_in. I signed in with Firefox and used it's Inspect Element tool to get the POST data. The curl command I got looks like
Code:
curl 'https://app.example.com/api/v1/auth/sign_in' -H 'Content-Type: application/json' -d '{"email":"username","password":"pass"}'
Note that the url here defers from the regular login url. Also note that I stripped down the headers from the command.
The curl command returns success and what seems to be my whole account information.
Now I can do the same in python with urllib2 and get the same result as the curl command. (The url being the same as the url in the curl command.) How can I manage to get a login to the usual site, i.e. https://app.example.com/users/sign_in and then get the page I am redirected to as a result? I think I don't understand this whole thing behind json.
Code:
req = urllib2.Request("https://app.example.com/users/sign_in", json_data, headers)
>>> response = urllib2.urlopen(req)
>>> the_page = response.read()
doesn't seem to work..
Do you guys need more information?
Would be glad to get some input. Thanks!
Reply


Messages In This Thread
Login to side - by diophantus7 - 2017-04-20, 16:56
RE: Login to side - by Skipmode A1 - 2017-04-21, 06:25
RE: Login to side - by Roman_V_M - 2017-04-21, 08:34
RE: Login to side - by diophantus7 - 2017-04-21, 10:02
RE: Login to side - by Skipmode A1 - 2017-04-21, 12:51
RE: Login to side - by diophantus7 - 2017-04-25, 13:49
Logout Mark Read Team Forum Stats Members Help
Login to side0