URLFetch not passing basic auth

Asked Apr 26, 2024·1 reply·Last activity 2 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Hey guys,

I have a !ptz command on my YouTube that changes the PTZ camera view, the command calls a NGINX server that hasn't changed in years; but it would appear nightbot isn't working anymore, not sure when it stopped.

$(urlfetchUSERNAME:PASSWORD@HOST/ohakune-cam-ptz-$(1)

I have verified the URL still works in browsers, however in an incognito browser it fails, I suspect due to session/cookie etc being denied. With the incognito it pops up the user/pass asking for authentication, and the login works just fine.

So my query, has there been a change to the way Nightbot calls URL's and specifically why auth cannot be passed in the HTTP GET

UPDATE: For now I've just had to disable auth to the site to get things working.

1 reply

I don't believe Nightbot will proxy the "Authorization" header in the request, although it's the first I'm hearing of anyone attempting this. You can likely configure Nginx using Lua to read uri like example.com?username=Hello&password=textor ?key=RandomKeys64Length as an alternative if Google is to be believed.