`api_client.FormsApi.update()` failing for forms created via `new-editor` web UI.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện bản cập nhật với script Python được cung cấp và các yêu cầu curl tương đương cho các biểu mẫu legacy và new-editor. So sánh các endpoint v3 và v4, đồng thời ghi lại liệu phản hồi allowlist có xảy ra độc lập với SDK hay không. Hoàn tất có nghĩa là xác định được hạn chế ở phía API và либо khôi phục các bản cập nhật được hỗ trợ hoặc ghi lại quyền truy cập và endpoint cần thiết.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- Python
- Star
- 434
- Fork
- 126
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của HubSpot/hubspot-api-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
HubSpot/hubspot-api-python#497 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
HubSpot/hubspot-api-python#498 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
HubSpot/hubspot-api-python#496 ·
-
HubSpot v4 APIs are deprecated Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
HubSpot/hubspot-api-python#495 · 1 bình luận · 2 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
HubSpot/hubspot-api-python#494 ·
Tất cả issue của HubSpot/hubspot-api-python
Issue tương tự
-
bug confirmed issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
open-webui/open-webui#30750 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100