1.0.4 • Published 3 years ago
@morgann1/bloxlink v1.0.4
@morgann1/bloxlink - an unofficial NPM package to interact with the Bloxlink v3 API.
Installation
With Node Package Manager:
$ npm install @morgann1/bloxlinkWith Yarn
$ yarn add @morgann1/bloxlinkUsage (Setting up)
const { Configuration, BloxlinkAPI } = require("@morgann1/bloxlink");
const configuration = new Configuration({
apiKey: "your api key goes here"
});
const bloxlink = new BloxlinkAPI(configuration);Search API (Discord -> Roblox)
(async () => {
const result = await bloxlink.search("DISCORD ID", "GUILD ID (OPTIONAL)");
console.log(result);
})();The example above should log a response similar to the following:
{
success: true,
user: { robloxId: '23587198', primaryAccount: '23587198' }
}A bad response should not include any information in the user object:
{
success: true,
user: {}
}Alternatively, a bad response could also return a 429 Too Many Requests
Reverse Searching (Roblox -> Discord)
Mentioned by John (Community Manager for Bloxlink):
Reminder, reverse API lookups are not for the public. It is limited to only certain large groups.
If you send an email requesting access, you will most likely be denied. Even for large groups, it’s very limited.