[Это мой код]
import requests
# after post code>
# ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmxlSEFpT2pFMU9UUTJOalU1TmpBc0lrMXZaR1ZzSWpwN0lrTm9ZWEpoWTNSbGNuTlFaWEpFWVhraU9qVXdNREF3TENKVmMyVnlTV1FpT2pNMk16SXNJbFZ1YVhGMVpVbGtJam9pTnpObE5UVTNPR1l0WW1FMk5TMDBaVGt3TFRoallXVXRZMlEzWWpWaVlUZ3hORGhsSW4xOS5YRjFoZDltQ2hGRkpKel96UXZ5TFNJcXhTZFpucklWeXppZ1R6NWJCVHBV
URL_AUTH = 'https://developers.lingvolive.com/api/v1.1/authenticate'
URL_TRANSLATE = 'https://developers.lingvolive.com/api/v1/Minicard'
KEY = 'NzNlNTU3OGYtYmE2NS00ZTkwLThjYWUtY2Q3YjViYTgxNDhlOjc4NDM0MDRmMjNmODRlMTc5MzJlNTRiNThhMGM4MGQy' # key before post
headers_auth = {"Authorization": "Basic" + KEY}
auth = requests.post(URL_AUTH, headers=headers_auth)
print(auth)
Это Почтальон
KEY - Authorization
VALUE - Basic NzNlNTU3OGYtYmE2NS00ZTkwLThjYWUtY2Q3YjViYTgxNDhlOjc4NDM0MDRmMjNmODRlMTc5MzJlNTRiNThhMGM4MGQy
Когда я пишу auth.text, в консоли нет вывода
import requests
# after post code>
# ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmxlSEFpT2pFMU9UUTJOalU1TmpBc0lrMXZaR1ZzSWpwN0lrTm9ZWEpoWTNSbGNuTlFaWEpFWVhraU9qVXdNREF3TENKVmMyVnlTV1FpT2pNMk16SXNJbFZ1YVhGMVpVbGtJam9pTnpObE5UVTNPR1l0WW1FMk5TMDBaVGt3TFRoallXVXRZMlEzWWpWaVlUZ3hORGhsSW4xOS5YRjFoZDltQ2hGRkpKel96UXZ5TFNJcXhTZFpucklWeXppZ1R6NWJCVHBV
URL_AUTH = 'https://developers.lingvolive.com/api/v1.1/authenticate'
URL_TRANSLATE = 'https://developers.lingvolive.com/api/v1/Minicard'
KEY = 'NzNlNTU3OGYtYmE2NS00ZTkwLThjYWUtY2Q3YjViYTgxNDhlOjc4NDM0MDRmMjNmODRlMTc5MzJlNTRiNThhMGM4MGQy' # key before post
headers_auth = {"Authorization": "Basic" + KEY}
auth = requests.post(URL_AUTH, headers=headers_auth)
print(auth.text)
Запрос: https://i.stack.imgur.com/rSPhO.png Почтальон: https://i.stack.imgur.com/z2fLL.png После запуска программа выдает ошибку 401. Я трижды проверил всю информацию. Вы знаете, как решить эту проблему?