hubdot
  • Welcome
  • API
    • Hub
    • Product
    • User
  • Roblox Hub
    • Setup
    • Adding products
    • Testing locations
  • Node.js module
    • Introduction
    • Hub
    • Product
    • User
Powered by GitBook
On this page

Was this helpful?

  1. Node.js module

User

All user methods respond with a promise.

Fetch user's information.

api.fetchUser("348853688179359746", "discord").then((user) => {
    console.log(user.robloxUserId); // 79291163
});

api.fetchUser("79291163", "roblox").then((user) => {
    console.log(user.discordUserId); // 348853688179359746
});

Create/verify user.

api.createUser("348853688179359746");

Fetch user's products from authenticated hub.

api.fetchUserProducts("79291163").then((products) => {
    console.log(products); // ["productdot", "productdot 2"]
});

PreviousProduct

Last updated 3 years ago

Was this helpful?