Alternatives to /profileheader-json?

Is there any alternatives to https://www.roblox.com/users/profile/profileheader-json like I’ve seen in this here (bloxyjs)


    getUserProfileHeader (options: GetUserProfileHeaderOptions): Promise<GetUserProfileHeader> {
        return this.request({
            requiresAuth: false,
            request: {
                url: `https://www.roblox.com/users/profile/profileheader-json?userId=${options.userId}`
            },
            json: true
        })
            .then(response => response.body);
    }

Instead of using nobloxjs which “aggregate of multiple endpoints” I’m looking for a solution which is easier for my discord bot.

What specific data points about the user are you trying to fetch?

Similar to that specific endpoint, but mainly the UserId, DisplayName, Username, Followers, Followings, Banned, Verified, Created, HeadshotImage

But I’ve wanted extra like this

export type GetUserProfileHeader = {
    UserId: number;
    ProfileUserId: number;
    ProfileUserName: string;
    ProfileDisplayName: string;
    FriendsCount: number;
    UserPresenceType: EnumUserPresence;
    LastLocation: string | null;
    UserStatus: string | null;
    UserStatusDate: string | null;
    UserPlaceId: number | null;
    FollowersCount: number;
    FollowingsCount: number;
    IsVieweeBlocked: boolean;
    IsViewerBlocked: boolean;
    AreFriends: boolean;
    IncomingFriendRequestPending: boolean;
    MaySendFriendInvitation: boolean;
    FriendRequestPending: boolean;
    MayFollow: boolean;
    IsFollowing: boolean;
    CanMessage: boolean;
    MessagesDisabled: boolean;
    CanBeFollowed: boolean;
    CanTrade: boolean;
    CanSeeFavorites: boolean;
    MayImpersonate: boolean;
    MayEdit: boolean;
    HeadShotImage: {
        Final: boolean;
        Url: string;
        RetryUrl: string | null;
        UserId: number;
        EndpointType: "Avatar" | string;
    };
    PreviousUserNames: string;
    IsUserOnPhone: boolean;
    CanSeeInventory: boolean;
}

This is from Bloxy-JS but the API they’ve used is deprecated.

This is the closest endpoint I was able to find:

local HttpService = game:GetService("HttpService")

--proxy this if you run it in Roblox
local url = "https://apis.roblox.com/profile-platform-api/v1/profiles/get"

local actions = {"EditProfile","QrCode","Chat","JoinExperience","Block","Unblock","AddFriend","Unfriend",
	"AcceptFriendRequest","PendingFriendRequest","IgnoreFriendRequest","CannotAddFriend",
	"AcceptOffNetworkFriendRequest","AddFriendFromContacts","AddFriendFromContactsSent",
	"Follow","Unfollow","EditAlias","Report","JoinCommunity","CancelJoinCommunityRequest",
	"ViewCommunity","ViewFullProfile","CopyLink","LeaveCommunity","MakePrimaryCommunity",
	"RemovePrimaryCommunity","ShareProfile","ConfigureCommunity","ClaimCommunityOwnership",
	"ChangeCommunityOwner","ViewInventory","ViewFavorites","TradeItems","LogInToAddConnection",
	"SignUpToAddConnection","ImpersonateUser","EditAvatar","FollowUser","UnfollowUser"}

local components = {
	{component = "UserProfileHeader"},
	{component = "Actions", supportedActions = actions},
	{component = "About"},
	{component = "CurrentlyWearing"},
	{component = "ContentPosts"},
	{component = "Friends"},
	{component = "Collections"},
	{component = "Communities"},
	{component = "FavoriteExperiences"},
	{component = "RobloxBadges"},
	{component = "PlayerBadges"},
	{component = "Statistics"},
	{component = "Experiences"},
	{component = "Store"}
}
local data = {
	profileId = 1, --user profile id
	profileType = "User",
	components = components, 
	includeComponentOrdering = true
}

local response = HttpService:PostAsync(url, data, Enum.HttpContentType.ApplicationJson)

print(game.HttpService:JSONDecode(response))

In my reply the arguments are from the default call the browser does on the background. You can remove the components that you don’t want the API to return.

1 Like

Anymore components that I can add?