A
A
Alex F2017-09-24 22:29:24
Python
Alex F, 2017-09-24 22:29:24

How to access the megaphone API?

Welcome all!
The bottom line is this:
There is an "exhaust" megaphone API, which works only 600 seconds after authorization in the personal account.
Interested, of course, this is https://lk.megafon.ru/api/lk/options/remaindersMini. (in the picture) When trying to log in:
s_1506280580_9821468_24e41e860b.png

login = '**********'
password = '******'
url = 'https://lk.megafon.ru'
pag = requests.get(url, auth=HTTPDigestAuth(login, password), headers=headers, timeout=5)
client.get(url) 
csrftoken = client.cookies
print (csrftoken)

We get a lot of interesting things:
<RequestsCookieJar[<Cookie APP-VERSION=3.42.0/3.41.0-c712e65e-583f-464c-8e4f-bcebc04032ef for lk.megafon.ru/>,
<Cookie CSRF-TOKEN=14ffd46f-23df-442a-8892-2debfe351c46 for lk.megafon.ru/>, 
<Cookie DEVICE-ID=2f242392-a15c-11e7-97be-0050568c7394 for lk.megafon.ru/>, 
<Cookie JSESSIONID=D47483D92D4DF6B9B59CC067410638CE.2B for lk.megafon.ru/>, 
<Cookie NGX-CACHE-VERSION=3.41.0-c712e65e-583f-464c-8e4f-bcebc04032ef for lk.megafon.ru/>]>

Question: What and how to feed lk.megafon.ru/api/lk/options/remaindersMini to get JSON output?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2017-09-27
@dimonchik2013

unpick here either sniffany fiddler or chrome
, most likely, there is not enough xdr header

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question