Skip to content

Users API

JohnMackYouTube05 edited this page Jan 27, 2021 · 2 revisions

Users API

In order to import the Users section of this API, you need the RobloxAPI.py file to be in the same directory as your python project, and then write:

from RobloxAPI import Users

or you can import everything by doing

from RobloxAPI import *

which will give you access to a few different classes: Users, Games, Groups and Catalog. (more may be coming soon!)


Functions

getUserStatus(UserId)

This function allows you to get the status of any user that has one. Example:

from RobloxAPI import Users
Users.getUserStatus(52839454)

Return Type: String Output: 'Just follow me, I have no more room for friend requests!'


getUsernameHistory(UserId)

Return Type: List This function gets the username history of the specified User ID, and returns it as a list object. Keep in mind if the user ID has no past names, the data will be returned empty.


getUserInfo(UserId)

This function retrieves detailed user information of a specific User ID, such as join date, and ban status, and returns all of it as a list. Return Type: Tuple


searchUsers(keyword, limit)

Parameters:

  • keyword: keyword you want to search for usernames with. (string)
  • limit: Limit how many results get returned back. Default limit is 100. Other valid limits are 10, 25, and 50. (int) Searches for usernames containing the keyword you specified, and a little bit of info about each user. Example:
Users.searchUsers("noob", 10)

Output:

[{'previousUsernames': [], 'id': 338195842, 'name': 'noobfrickf', 'displayName': 'noobfrickf'}, {'previousUsernames': [], 'id': 338196267, 'name': 'noobislifeonroblox', 'displayName': 'noobislifeonroblox'}, {'previousUsernames': [], 'id': 339252234, 'name': 'noob1234567891122', 'displayName': 'noob1234567891122'}, {'previousUsernames': [], 'id': 347331508, 'name': 'Noob18234456', 'displayName': 'Noob18234456'}, {'previousUsernames': [], 'id': 338276107, 'name': 'noobylifehehe', 'displayName': 'noobylifehehe'}, {'previousUsernames': [], 'id': 338303566, 'name': 'noob1352321', 'displayName': 'noob1352321'}, {'previousUsernames': [], 'id': 338551405, 'name': 'noob777777777i', 'displayName': 'noob777777777i'}, {'previousUsernames': [], 'id': 338551453, 'name': 'NOOB_LORD123456', 'displayName': 'NOOB_LORD123456'}, {'previousUsernames': [], 'id': 339168810, 'name': 'NOOBNOAHLOVESGIRLS', 'displayName': 'NOOBNOAHLOVESGIRLS'}, {'previousUsernames': [], 'id': 339499887, 'name': 'NoobPlayerCoin', 'displayName': 'NoobPlayerCoin'}]

getUserByUsername(username, excludeBannedUsers)

Parameters:

  • username - The username of the user you want to get info for. (string)
  • excludeBannedUsers - (Optional Parameter) Whether or not you want to exclude banned users from the search. Default is false. (bool) Example:
Users.getUserByUsername("Yellowboy111", True)

Output:

 [{'requestedUsername': 'Yellowboy111', 'id': 52839454, 'name': 'Yellowboy111', 'displayName': 'Yellowboy111'}]

Clone this wiki locally