Skip to content

Add possibility to configure Headers for Webhooks #275

@JJetmar

Description

@JJetmar

Feature

In the past there was added "feature on Apify Platfrom" which allowed to put headers to the Request when adding Webhook integration to the Actor.

But this was not reflected to the SDK yet. There are people asking for it on discord.

Motivation

Keep in sync the possibility of the Platform with the Apify SDK.

Ideal solution or implementation, and any additional constraints

Possibly just add headers parameter - something like:

await Actor.addWebhook({
  eventTypes: ['ACTOR.RUN.SUCCEEDED'],
  requestUrl: process.env.RUN_SUCCEEDED_WEBHOOK_URL,
  idempotencyKey: process.env.APIFY_ACTOR_RUN_ID,
  headers: {
     'Authorization': Bearer ${process.env.APIFY_API_TOKEN},
  }
})

Alternative solutions or implementations

No response

Other context

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions