`api_client.FormsApi.update()` failing for forms created via `new-editor` web UI.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia riproducendo l’aggiornamento con lo script Python fornito e richieste curl equivalenti per i moduli legacy e new-editor. Confronta gli endpoint v3 e v4 e registra se la risposta di allowlist si verifica indipendentemente dall’SDK. Il lavoro è completato quando viene identificata la restrizione lato API e vengono ripristinati gli aggiornamenti supportati oppure vengono documentati l’accesso e l’endpoint necessari.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
- Lingua principale
- Python
- Stelle
- 434
- Fork
- 126
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di HubSpot/hubspot-api-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
HubSpot/hubspot-api-python#497 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
HubSpot/hubspot-api-python#498 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
HubSpot/hubspot-api-python#496 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
HubSpot/hubspot-api-python#495 · 1 commento · 2 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
HubSpot/hubspot-api-python#494 ·
Tutte le issue di HubSpot/hubspot-api-python
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
huggingface/Repo2RLEnv#163 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
NousResearch/hermes-agent#121143 ·