SugarCRM getting the TOKEN ,在本地运行良好,但在 Google App 引擎上尝试时会出现错误 [500]
"Bad data passed in;<a href="......."> Return to Home</a>
在这里,我从用户那里获取数据到字典 crm_details 中,然后用于发送请求。 我的要求如下,
url = "https://" + crm_details['instance'] + "/rest/v10/oauth2/token"
payload = {"password": crm_details['password'],
"username": crm_details['crm_admin'],
"client_id": crm_details['key_name'], "platform": "base",
"client_secret": crm_details['key']}
r = requests.post(url, data=json.dumps(payload))
最佳答案
问题出在平台。 集成 SugarCRM 时,必须将新平台添加到文件中。
When working directly with the filesystem, enable the disable_unknown_platforms configuration by setting $sugar_config['disable_unknown_platforms'] = true in your ./config_override.php. This will prevent the system from allowing unknown platform types from accessing the rest endpoints. Next, create a file in ./custom/Extension/application/Ext/Platforms/ to map a new platform in the system. The following example adds a new platform called 'integration' that can be used throughout the system:
它将在之后立即工作。
关于python - Google App Engine 中的 SugarCRM 'Bad data Passed in',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45932849/