Answer the question
In order to leave comments, you need to log in
Authorization in instagram?
There is a need to write a script to get an access token in instagram. Did according to this article habrahabr.ru/post/143972 . Accordingly, I changed it to what is needed for instagram
url_string = "https://instagram.com/oauth/authorize/?client_id=%s&redirect_uri=%s&response_type=code" % (self.__cient_id_, self.__redirect_uri_)
parser.params["username"] = login
parser.params["password"] = password
if parser.method == "POST":
response = opener.open((parser.url), urllib.urlencode(parser.params))
form method="POST" id="login-form" class="adjacent" action="/accounts/login/?force_classic_login=&next=/oauth/authorize/%3Fclient_id%3D07456f3a5026417b97e166e0558995f4%26redirect_uri%3Dhttps%3A//limitless-wave-5692.herokuapp.com%26response_type%3Dcode">
<input type="hidden" name="csrfmiddlewaretoken" value="71ca4f35b134dcc299c1c2092a97bb2d"/>
<p><label for="id_username">Имя пользователя:</label> <input name="username" maxlength="30" autocapitalize="off" autocorrect="off" type="text" id="id_username" /></p>
<p><label for="id_password">Пароль:</label> <input autocapitalize="off" autocorrect="off" type="password" name="password" id="id_password" /></p>
<p class="form-actions">
<a href="/accounts/password/reset/">Забыли пароль?</a>
<input type="submit" class="button-green" value="Войти" />
</p>
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question