Robloxdotnet
This is for all the .NET Core developers out there! Robloxdotnet is a Roblox Web API wrapper library for the C# language. It offers various classes and simple methods that make interacting with the Roblox API easy!
Documentation: Home · Loravis/Robloxdotnet Wiki · GitHub
Get it here: NuGet Gallery | Robloxdotnet 1.1.1
If you have any feedback or suggestions for features or improvements, message me on Discord (@loravis) or just post them here.
Why use Robloxdotnet?
- Robloxdotnet is very easy to use and well documented.
- Robloxdotnet is being updated frequently with new features and patches.
Features
(As of version 1.1.1)
- Get user information
- Authentication
- Send group shouts
- Update user group roles
- Get user’s group information
Examples
Get a user’s description
using System;
using Robloxdotnet;
ulong userId = 1; //Insert any userId of your choice
var userInfo = await Roblox.GetUserInfo(userId); //Get the user's information
Console.WriteLine(userInfo.description); //Output the user description
Log into your Roblox account
using System;
using Robloxdotnet;
//Disclaimer: Storing your .ROBLOSECURITY directly in your code is strongly discouraged, especially if you're committing your code to a public github repo!
string roblosecurityCookie = "PASTE_YOUR_.ROBLOSECURITY_COOKIE_HERE";
RobloxSession session = new RobloxSession();
try
{
await session.LoginAsync(roblosecurityCookie); //Log into your Roblox account using your roblosecurity cookie
Console.WriteLine("Logged in as: " + session.name); //Output your Roblox account's username
} catch (Exception ex)
{
Console.WriteLine(ex.Message); //Output the exception message if the login fails
}
Update a user’s group role
using System;
using Robloxdotnet;
using Robloxdotnet.Utilities.Groups;
//Disclaimer: Storing your .ROBLOSECURITY directly in your code is strongly discouraged, especially if you're committing your code to a public github repo!
string roblosecurityCookie = "PASTE_YOUR_.ROBLOSECURITY_COOKIE_HERE";
RobloxSession session = new RobloxSession();
try
{
await session.LoginAsync(roblosecurityCookie); //Log into your Roblox account using your roblosecurity cookie
ulong userId = 1; //Insert the user's user ID here
ulong groupId = 12345; //Insert the group's group ID here
int role = 255; //Insert the roles's role number here
await MemberManagement.SetUserGroupRole(session, userId, groupId, role); //Update the group role of the specified user
} catch (Exception ex)
{
Console.WriteLine(ex.Message); //Output the exception message
}