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

Was this helpful?

  1. Sanity API

Random Number API

How to use the random number api

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

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

//Or using a function

async function makeGetRequest() {

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

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

makeGetRequest();
PreviousSome Basic Rules and InfoNextPassword Generator API

Last updated 2 years ago

Was this helpful?