The urlfetch (formerly customapi) variable calls a remote url to retrieve and display a response. It's useful for building more complex commands that Nightbot does not support.
url is a URL that returns a body in plain text with less than 400 characters in its response
Check out the Custom APIs sub-forum on our Community Forum: https://community.nightdev.com/c/nightbot/custom-apis
Nightbot sends request headers that contain pertinent information of the user calling the command, the channel the command was called, and a response URL to POST a response.
Nightbot-Response-Url - A response link where responses can be sent with a POST request without prior authorization. See /channel/send in the API docs.
Nightbot-User - User data of the user who used the command that triggered the urlfetch. Note: This header is not sent when the urlfetch is called from a timer.
Nightbot-Channel - Channel data of the channel where the command was used.