Sanity Docs
  • Sanity Documentation
  • Coming Soon!
  • Changlog
  • Commands
    • All Commands
      • Utility Commands
      • Moderation Commands
      • Fun Commands
      • Welcome Commands
      • Web Ping Commands
      • Bump
  • Web Pinging
    • Rules
    • How does it work
  • Dashboard & Website
    • Dashboard Rules
    • Website Rules
    • Short Link Rules
  • Sanity API
    • How To Use
    • Some Basic Rules and Info
    • Random Number API
    • Password Generator API
    • Letter Generator API
    • Character Generator API
    • Color Generator API
  • What Happened to Utilis
    • The Story
Powered by GitBook
On this page
  • This is the url you will use to get the API and the data behind it. This specific API generates a random number.
  • Code

Was this helpful?

  1. Sanity API

How To Use

The Utilis API is a very simple thing to use. Let us show you how to use it

This is the url you will use to get the API and the data behind it. This specific API generates a random number.

GET https://dashboard.utilis.tk/api/randomnumber

Code

Random Color

This will return a hex code.

let res = await axios.get("https://sanitybot.xyz/api/randomcolor");

  let data = res.data.color;
 console.log(data);
}

//Or using a function

async function makeGetRequest() {

  let res = await axios.get("https://sanitybot.xyz/api/randomcolor");

  let data = res.data.color;
 console.log(data);
}

makeGetRequest();

PreviousShort Link RulesNextSome Basic Rules and Info

Last updated 2 years ago

Was this helpful?