I want to do an API call inside function node without using HTTP node can anyone show me an example

I want to do an API call inside function node without using HTTP node can anyone show me an example

You would need to use a suitable library in your n8n instance (and allow using them via the NODE_FUNCTION_ALLOW_EXTERNAL environment variable) and will then be able to make http requests in your Function node. You can find an example snippet here:

export NODE_FUNCTION_ALLOW_BUILTIN=util

export NODE_FUNCTION_ALLOW_EXTERNAL=request

I have placed the above two in .env file and there is a error which says, ```
VMError: Access denied to require ‘request’