Dynamic Status Page For Discord Bot Using Uptime Robot API v2.0

Project URL: Glitch :・゚✧
Live App: https://uptimerobot-monitor-status.glitch.me

This is the JavaScript version of Dynamic Status Page For Discord Bot Using Uptime Robot API with even more features, such as uptime ratio and uptime/downtime logs of the monitor.

To use this status page, you’ll need a monitor-specific API key for the monitor you want to show. You can obtain it:

  1. Log in to uptimerobot.com.
  2. Click on My Settings.
  3. Scroll down all the way to API Keys section.
  4. Under Monitor-Specifc API Keys, generate an API key for the monitor you want.
  5. Remix the project at Glitch :・゚✧.
  6. In the client.js file located in the public folder, paste the API key you obtained in line 4.
var apikey = "API_KEY HERE";
  1. Click on Show and In a New Window and your status page is live.

Many of you might think that making the API key public might be dangerous, but UptimeRobot clearly states that

They can be safely shared and/or used in client-side code as the main API key won’t be revealed.

View demo at https://uptimerobot-monitor-status.glitch.me

3 Likes

I would recommend to pull the API key from .env, like this. This is to keep our API keys out of sight.

UPTIMEROBOT_API_KEY=somerandomkeyhere
1 Like

Hey @AJHaliliDev2006PH,

I found out the hard way that the.env works only for server-side code and not for client-side code like the above statuspage!

1 Like

Hey, just wanted to point out that this exposes your Uptime Robot API key in client.js, which means that anyone can use the API under your account using that key.

They could use that key to delete the monitor, create new monitors, or do anything else with the API under your account.

1 Like

Hey @benborgers,

Thanks for your concern :slight_smile: but:

  1. And that is why I have asked to use a monitor-specific API key, which does not allow creating, deleting monitors or do anything with the API!

Oh perfect, no problem then!

1 Like

This is really good!

1 Like

Thanks, @SpeedyCraftah!

I’m planning on adding uptime/downtime graphs based on the data pulled from the API.