Reference API Roblox

Engine API

Website

Related

Reference API Roblox

UserService

A service that handles queries regarding users on the Roblox platform.

This class is not creatable. Instances of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
Tags: [NotCreatable, Service]

Member index 1

HistoryMember
462GetUserInfosByUserIdsAsync(userIds: Array): Array
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

A service that handles queries regarding users on the Roblox platform.

History 3

Members 1

GetUserInfosByUserIdsAsync

Parameters (1)
userIdsArray
Returns (1)
Array

This function lets you request information about users outside of the current DataModel in bulk. The input and output values are both arrays.

  • The order of the user info objects in the return value's array may not match the order of the UserIds sent in the input parameter's array. Use the Id field of the user info object to identify your input array with the output array.
  • It's possible to receive fewer user info objects than requested if one or more of the UserIds in the request array are invalid, such as negative numbers or user IDs that don't have accounts associated with them. It's possible to receive a response with zero results if all UserIds are invalid.
  • If a Roblox user does not have a DisplayName associated with their account, this function will instead return the same string as the user's username in their info object's DisplayName field. While a user's UserId will never change, they may change their username or display name, so the same input UserIds may return a different string for these fields from one day to another.
  • Since GetUserInfosByUserIdsAsync() makes an external web request, it will yield and may fail if the backend service is experiencing interruptions. Ensure you can handle downtime appropriately by wrapping this method with a pcall().
  • Results are limited to 250 per minute, so if you receive an HTTP 429 error, try again later, ideally after reducing the number of UserIds in your input array, reducing the number of method calls, or both.

The signature of a singular user info object is:

KeyTypeDescription
IdnumberThe UserId associated with the user.
UsernamestringThe username associated with the user.
DisplayNamestringThe DisplayName associated with the user.
HasVerifiedBadgebooleanThe HasVerifiedBadge value associated with the user.
This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

Settings