How to send http request from Rules sections

This post

shows how to query SQLServer for the Role table in an external server.
I need the same solution (ask for user roles so I can add this data to the token) but to query an http server instead.
I don’t know if it is possible to use fetch library from that auth0 function (serverless style).

Is that possible?


@klosterr rules are node.js snippets that run in the context of a webtask behind the scenes. By default webtask ships with over a thousand node_modules, however it does not seem fetch is shipped as a default node_module. Instead you could use var request = require('request') and perform you http request with that node_module.

1 Like

Thank you sgmeyer, ‘request’ library is all I need.


1 Like