RbxProxy
  • Introduction
    • Installation
    • Introduction to Promises
    • Introduction to Pages
  • Reference
    • API Reference
      • Client
      • Avatar
      • Friends
      • Game
      • Group
      • User
Powered by GitBook
On this page
  • countFriends
  • getFollowers
  • getFollowings
  • countFriendRequests
  • getFriends
  1. Reference
  2. API Reference

Friends

PreviousAvatarNextGame

Last updated 3 years ago

This page has methods that include things like friends and followers. The page below introduces you to "promises" which is what is used to handle success and errors with the API.

countFriends

This method does not require authorization.

This method counts the friends for a specified user.

Sample code: (provides the friend count of the Roblox account)

client.friends:countFriends(1):andThen(function(count)
    print(count)
end):catch(warn)

Arguments:

Type
Name

integer

userId

Returns: <integer>

getFollowers

This method does not require authorization.

This methods gets the followers of a specified user in a page format. If you do not know how to use pages, you can check it out at the page below.

Sample code: (gets the followers of me)

client.friends:getFollowers(87424828):andThen(function(pageObject)
    print(pageObject:getCurrentPage());
end):catch(warn)

Arguments:

Type
Name

integer

userId

Returns: <array> (page object)

getFollowings

This method does not require authorization.

This method gets the people the specified user is following in a page format. If you don't know how to use pages, here's the rundown:

Sample code: (gets the people I'm following) (nobody lol)

client.friends:getFollowings(87424828):andThen(function(pageObject)
    print(pageObject:getCurrentPage());
end):catch(warn)

Arguments:

Type
Name

integer

userId

Returns: <array> (page object)

countFriendRequests

This endpoint requires authorization

This counts the friend requests for the current authenticated user.

Sample code:

client.friends:countFriendRequests():andThen(function(number)
    print(number)
end):catch(warn)

This function requires no arguments.

Returns: <integer>

getFriends

This method does not require authorization.

This method returns the friends of a specified user in an array format.

Sample code:

client.friends:getFriends(87424828):andThen(function(friends)
    print(friends)
end):catch(warn)

Arguments:

Type
Name

integer

userId

Returns: <array> Example:

{
    {
        ["created"] = "0001-01-01T06:00:00Z",
        ["displayName"] = "k9gal18",
        ["friendFrequentRank"] = 1,
        ["id"] = 13140528,
        ["isBanned"] = false,
        ["isDeleted"] = false,
        ["isOnline"] = false,
        ["name"] = "k9gal18",
        ["presenceType"] = 0
    },
}
Introduction to Promises
Introduction to Pages
Introduction to Pages