Помощь в получении access_token & refresh_token (amoCRM oAuth) Python
Нужно обменять аuthorization code на access_token & refresh_token (amoCRM oAuth) Python
Делаю все как в оф документации. (https://www.amocrm.ru/developers/content/oauth/step-by-step)
import requests
params = {
"client_id": "54ce9c78-70da-4fd1-8b29-2f1f785c615f",
"client_secret": "baFimWQxC2xz6qmG7H98sf7bjY6hJhYApQwtIBahgY5",
"redirect_uri": "https://7efe3096c93c.ngrok.io/",
"grant_type": "authorization_code",
"code": "def502003b4fcd6d08aa7f9560bc50"
}
headers= {
"Content-Type": "application/json"
}
r=requests.post('https://mydom.amocrm.ru/oauth2/access_token',headers=headers, params=params)
print(r.text)
Получаю: {"title":"Некорректный тип доступа","type":"https://developers.amocrm.ru/v3/errors/OAuthProblemJson","status":400,"detail":"Передано некорректное значение"}
Кто подскажет что делаю не так и сколько будет стоить? Жду ставки либо в ЛС
-
1641 23 0 Привет. Сталкивался с этой проблемой, есть решение) Пиши в лс
-
через curl та же ошибка. Проверьте данные в параметрах
-
{"hint":"Cannot decrypt the authorization code","title":"Некорректный запрос","type":"https://developers.amocrm.ru/v3/errors/OAuthProblemJson","status":400,"detail":"В запросе отсутствует ряд параметров или параметры невалидны"}
-
1. Не так передаешь запрос. Ты не отправляешь данные как json. Ты отправляешь их в строку, как при GET запросе.
Делай так requests.post(url, json=params)
headers теперь вообще не надо передавать.
2.
{'hint': 'Cannot decrypt the authorization code',
'title': 'Некорректный запрос',
'type': 'https://developers.amocrm.ru/v3/errors/OAuthProblemJson',
'status': 400,
'detail': 'В запросе отсутствует ряд параметров или параметры невалидны'}Так как параметры есть все, которые требуются (client_id, client_secret, grant_type, code, redirect_uri), то получается что-то не то с данными. Проверь их на ошибки.
-
Current freelance projects in the category Python
Data parsing through mobile APILooking for a person with experience in data parsing through mobile API, for parsing e-commerce, rozetka and similar sites. Tasks: 1. Intercepting traffic from the mobile application (Android), setting up a proxy, analyzing requests. 2. Identifying the necessary API endpoints… Python, Data Parsing ∙ 2 hours 56 minutes back ∙ 13 proposals |
Creation of a multifunctional bot in Telegram
22 USD
(I will provide all materials in private messages) Here is a detailed project description: After pressing the button /start The bot sends a text with rules and terms of use (under the text, the button ‘acknowledged’) After pressing the button, the next message is… Python, Bot Development ∙ 2 days 22 hours back ∙ 94 proposals |
Find a product feed (Google Merchant XML) for a website on OpenCart
16 USD
It is necessary to find a direct link to the active product feed (XML) of a competitor for Google Merchant Center Platform (CMS): OpenCart / ocStore Find the original feedRequirements for the result: Working link to the XML file Python, Data Parsing ∙ 5 days 12 hours back ∙ 28 proposals |
Development of a TikTok farm (content factory)It is necessary to develop a system for centralized management of multiple TikTok accounts with automatic content publishing, using individual proxies and simulating natural account activity. Functional Requirements1. Account Management Adding and removing TikTok accounts.… Python, Bot Development ∙ 5 days 23 hours back ∙ 21 proposals |
Improve the performance of Claude Code and work on software development.I am currently developing CRM and Analytics software. I am using Claude Code, but I understand that the results are not the best in terms of changes. There are 2 tasks - Need help creating a preset for skills, MD, and so on to improve quality. Take verified ones that have been… AI & Machine Learning, Python ∙ 6 days 6 hours back ∙ 26 proposals |