Remote Server Returned Code 401

Asked Dec 30, 2022·2 replies·Last activity 3 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.

I am using the $(urlfetch url) yet no matter what I try, it just returns a "Remote Server Returned Code 401" in chat, I have tested the URL on StreamElements & MooBot & it comes back fine with whatever needs to be displayed - Nightbot is the only exception?

I'm not sure what I am doing wrong or whether I'm missing required stuff? I have checked the docs for it. It isn't a JSON response, it is a plain text response & always less than 400 characters.

Could someone explain why it is returning this error & how to fix it?

2 replies

Hey @Graceful Ant!

What is the faulty URL?
A 401 error means the service calling the URL is unauthorized, in our case that most likely means Nightbot's IP has been blocked by the server that hosts the domain you're trying to reach with $(urlfetch).

Unfortunately I submitted this on December 24th, it has only just recently been accepted (I assume due to the holidays) - my issue has since been resolved on the Discord.