`api_client.FormsApi.update()` failing for forms created via `new-editor` web UI.
还没有人认领这个 Issue。
评估
调研方向
首先使用提供的 Python 脚本以及针对 legacy 和 new-editor 表单的等效 curl 请求重现该更新。比较 v3 和 v4 端点,并记录 allowlist 响应是否独立于 SDK 发生。完成标准是识别 API 侧限制,并恢复受支持的更新,或记录所需的访问权限和端点。
由索引模型根据 Issue 内容生成。
描述
Please note that this is an issue with the API in general, not specifically the Python SDK, as I get the same response when I run curl PUT or PATCH commands against the API.
To reproduce:
- Create a form via the web UI using the legacy editor
- Create a form via the web UI using the new editor
- Run the following script (replace placeholders)
import hubspot
from hubspot.marketing.forms import ApiException
client = hubspot.Client.create(access_token="PAT_TOKEN")
LEGACY_FORM_ID = "LEGACY_FORM_ID_HERE"
NEW_FORM_ID = "NEW_FORM_ID_HERE"
def main():
# works as expected
legacy_form_def = get_form_by_id(LEGACY_FORM_ID)
legacy_form_def.name = "UPDATED_LEGACY_FORM_NAME"
update_legacy_form_response = update_form(LEGACY_FORM_ID, legacy_form_def)
# fails
new_form_def = get_form_by_id(NEW_FORM_ID)
new_form_def.name = "UPDATED_NEW_FORM_NAME"
update_new_form_response = update_form(NEW_FORM_ID, new_form_def)
def update_form(form_id, form_data):
try:
api_response = client.marketing.forms.forms_api.update(form_id=form_id, hub_spot_form_definition_patch_request=form_data)
return api_response
except ApiException as e:
print("Exception when calling forms_api->update: %s\n" % e)
return None
def get_form_by_id(form_id):
try:
api_response = client.marketing.forms.forms_api.get_by_id(form_id=form_id)
return api_response
except ApiException as e:
print("Exception when calling forms_api->get_by_id: %s\n" % e)
return None
if __name__ == "__main__":
main()
Response when trying to update the form created via the new editor:
HTTP response body: {"status":"error","message":"The client is not allowlisted to perform an operation to v4 forms","correlationId":"4821afe0-8303-4adc-a358-55cd48a70bfb","category":"BANNED"}
What I've tried so far:
- Updated the URL from
https://api.hubapi.com/marketing/v3/forms/{form_id}tohttps://api.hubapi.com/marketing/v4/forms/{form_id} - Finding v4 marketing->form docs online (can't find them)
- 主要语言
- Python
- 星标
- 434
- 派生
- 126
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
HubSpot/hubspot-api-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
HubSpot/hubspot-api-python#497 ·
-
难度 3/5 1-2 天 新手友好度 58/100
HubSpot/hubspot-api-python#498 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 52/100
HubSpot/hubspot-api-python#496 ·
-
难度 4/5 3-5 天 新手友好度 35/100
HubSpot/hubspot-api-python#495 · 1 条评论 · 2 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 52/100
HubSpot/hubspot-api-python#494 ·
查看 HubSpot/hubspot-api-python 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 80/100
learningequality/kolibri#15351 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
Name consistency 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
eellak/triplestore#65 · 1 条评论 ·