-
Notifications
You must be signed in to change notification settings - Fork 14
fix: Enable to add headers template in webhooks created dynamically #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add usage of headers template https://docs.apify.com/platform/integrations/webhooks/actions#headers-template
@gaelloyoly Hello, thank for the PR. Just to help me understand the context of the change. In what situation do you get "headers_template" key in that dictionary? In other workds, why is it not 'headersTemplate' directly? |
@Pijukatel I wanted to create an ad-hoc webhook and I followed the example by passing a dict with payloadTemplate and headerTemplate but none of them was used. |
@gaelloyoly Could you please describe your top level call (Which client did you use, or did you call some |
Yes, it's the "start" method of the actor client. I'm doing something like this : from apify_client import ApifyClient
client = ApifyClient("APIFY_API_KEY")
client.actor("actor_id").start(
run_input={"url": "input_url"},
webhooks=[{
"event_types": ["ACTOR.RUN.SUCCEEDED"],
"request_url": "https://example.com/success",
"payload_template": "{{resource}}",
"headers_template": '{"x-custom-signature": "1234567890"}',
}],
) |
Thank you for the PR and the clarification. I created issue to refactor the part of the code responsible for handling the Webhooks inputs and in the meantime let's merge your PR. |
Thanks ! |
Add usage of headers template
https://docs.apify.com/platform/integrations/webhooks/actions#headers-template