Photo of Kelvin Liu


webrequest not running??


I have noticed that since sometime in mid March our lava codes which use webrequest have all been failing silently. No noticeable errors just suddenly not doing what it has been doing for more than a year(s). We were on Rock v9.x ... Just upgraded to 10 (in May) but I know it's not related to the upgrade because the problem has been there since March.

Hitting the api directly via Power Tools->Api, web browser or Postman works fine.

{% webrequest


headers:'Authorization-Token^somekey' %}

Response: {{ results | ToJSON }}

{% endwebrequest %}


Response: "0: "

Extra notes:

  • Changing to invalid endpoint: ex. Groupsx returns same result of "0: "
  • Changing to wrong auth token returns same result of "0: "

Can anyone shed any light on this?

Thank you

  • Photo of Nick Airdo


    Hi Kevin,

    I don't know if you sorted this out yet, but the only thing I noticed about that which likely won't work is having the `webrequest` Lava command split across multiple lines. If you do it like this (as seen on the pre-alpha site)

    {% webrequest url:'' headers:'Authorization-Token^qtYthmh9aCIMkR8VfJipD1Ar' %}
            Response: {{ results | ToJSON }}
    {% endwebrequest %}
    </pre> should be working as seen here:
    example showing webrequest

    Other than that, I would be remiss if I didn't mention that you should really consider updating to one of the latest secured versions of Rock mentioned in the top right corner of the Release Notes page at