-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
من به کمک پایتون قصد لاگین به کمک رابط نوبیتکس را داشتم که با خطای زیر مواجه شدم:
{'non_field_errors': ['Missing Captcha'], 'code': 'MissingCaptcha'}
کد مورد استفاده:
import requests
# api-endpoint
URL = 'https://api.nobitex.ir/auth/login/'
# location given here
username = 'test@test.com'
password = 'test1234'
# defining a params dict for the parameters to be sent to the API
data = {'username':username, 'password':password, 'remember':'no'}
# sending get request and saving the response as response object
r = requests.post(url=URL, json=data)
print (r.request.headers)
# extracting data in json format
data = r.json()
print(data)
Metadata
Metadata
Assignees
Labels
No labels