jovo.getRequestObject is not a function in onRequest event



I am trying to use onRequest event to inject some data to the request data, but it seems that it doesn’t exist in the event. Also, the example you give in the docs doesn’t work, because apparently jovo object doesn’t have getRequestObject method.

What I did is just created a new skill using cli and just added an event handler as described in the docs:

app.onRequest(function (jovo) {

Any ideas what’s up? Also is it possible to access request data in the event? I found, that only app data is accessible there. If there is any different, I am using JS.




Looks like Jovo v1 code in the docs.


app.onRequest((handleRequest) => {

Or a little cleaner:

app.onRequest(({host}) => {


Thanks, seems to be working.

I have one more question. What is the best way to access session attributes in these events? I have built this monstrosity:

Maybe there is some sort of helper method or shortcut to do that, that I am not aware of?


What’s your use case?

You could use a later stage of the middleware hooks.

app.hook('after.platform.init', (error, host, jovo) => {

This will be called after the platform and the jovo object has been initialized.


Thanks, this is exactly what I needed. I wanted to manipulate some session attributes and inject some stuff before handler execution.