python - Google App Engine 中的 SugarCRM 'Bad data Passed in'

标签 python google-app-engine sugarcrm

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/

相关文章:

java - appengine :update 的 Maven 构建生命周期

google-app-engine - 你如何在谷歌应用引擎(Python)中使用 numpy

SugarCRM 如何从 ListView 中隐藏编辑按钮

javascript - 使用 AJAX 更新 SugarCRM 子面板中的状态

python - Selenium 生成错误 "Element is not interactable"

python - 通过多次调用一个函数来显示多个 Matplotlib 图形?

python - 将列添加到文本文件

python - RandomForestClassifier 性能不佳

google-app-engine - 将自定义子域映射到 App Engine 上的特定版本

c# - SugarCRM Soap 的 get_entry_list 方法