Add custom header to JovoWebClient


Hi. I’m trying to add a custom header to an instance of JovoWebClient. The use case is that the client app is authenticated and I’m trying to share its access_token with the Jovo app, so the chatbot can also make requests through the Jovo handlers on behalf of the user.


Hey! You can pass headers in the send-method.

In the client:

await this.$client.createRequest({ type: RequestType.Launch }).send({
  headers: {
      'access_token': 'foobar'

In the app:

    const accessToken = this.$host.headers['access_token'];
    // ...


Thanks, @AlexSwe. You’re correct. This works.