Я пытаюсь вызвать CRM Suite API, но он просто возвращает 401.
{"error":"access_denied","message":"The resource owner or authorization server denied the request.","hint":"Missing \\"Authorization\\" header"}
вот как я вызываю API в python
import requests
url = "https://crm.unlokdevelopment.com/api/access_token"
payload = "{"client_credentials":"client_credentials",\n"client_id":****** ",\n"client_secret":"******"}" print(payload)
headers = { 'Content-Type': 'application/vnd.api+json', 'Accept': 'application/vnd.api+json' }
print(headers)
response = requests.request("POST", url, headers=headers, data=payload)
print(response)
print(response.text.encode('utf8'))
пожалуйста, скажите мне, что я делаю неправильно. Я также пробовал почтальона, но не повезло. я подтвердил правильность учетных данных