The getprofiledata gets profile information of a named avatar.

CommandRequired ParametersRequired Corrade PermissionsExample
getprofiledatagroup, password, data, firstname, lastname (or agent by UUID)interact
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // retrieve whether the avatar
            // Mark Spree is a mature profile
            // and the text from the language box
            "command", "getprofiledata",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            // or "agent", "69ce412b-dffc-436d-86ff-d788bfa66d9d"
            "firstname", "Mark",
            "lastname", "Spree",
            "data", wasListToCSV(
                [
                    "MaturePublish",
                    "LanguagesText"
                ]
            ),
            "callback", wasURLEscape(URL)
        ]
    )
);

The data parameter follows the AvatarProperties, ProfileInterests and AvatarGroup libopenmetaverse structures and sub-structures.

ParameterPossible ValuesDescription
dataAboutTextSecond Life profile text
AllowPublishShould this profile be published on the web
FirstLifeImageFirst Life image ID
FirstLifeTextFirst Life about text
FlagsFlags of the profile
MaturePublishIs this a mature profile
ProfileImageProfile image ID
ProfileURLWeb URL for this profile
LanguagesTextLanguages profile field
SkillsMaskSkills mask
SkillsTextSkills text
WantToMaskWantTo mask
WantToTextWantTo text

The SkillsMask and the SkillsText are special, they represent a bitfield mask corresponding to the individual tick-boxes on the interests profile tab.

The following table gives the individual values of each tick-box for the I Want To: section:

I Want To:Value
Build1
Explore2
Meet4
Group8
Buy16
Sell32
Be Hired64
Hire128

And the following table is for the skills section:

Skills:Value
Textures1
Architecture2
Event Planning4
Modeling8
Scripting16
Custom Characters32

Assuming that a request has been sent to Corrade to return the flags for the I Want To: section by setting the data parameter to wanttomask:

        llInstantMessage(CORRADE,
            wasKeyValueEncode(
                [
                    "command", "getprofiledata",
                    "group", wasURLEscape(GROUP),
                    "password", wasURLEscape(PASSWORD),
                    // or "agent", "69ce412b-dffc-436d-86ff-d788bfa66d9d"
                    "firstname", "Kira",
                    "lastname", "Komarov",
                    "data", "WantToMask",
                    "callback", wasURLEscape(URL)
                ]
            )
        );

The response will come back the callback URL. We can then process the returned data and obtain the ticked checkboxes:

    http_request(key id, string method, string body) {
        // send OK to corrade's callback request
        llHTTPResponse(id, 200, "Ok");
        // first get the data an unescape it
        list data = wasCSVToList(
            wasURLUnescape(
                wasKeyValueGet("data", body)
            )
        );
        // data comes in as "wanttomask, NUMBER"
        // so we get the NUMBER and store it
        integer wanttomask = llList2Integer(
            data,
            llListFindList(
                data,
                ["WantToMask"]
            )+1
        );
        // finally, we get the flags from the mask
        list flags = wasGetBitFlags(
            wanttomask,
            [ "Build", "Explore", "Meet", "Group", "Buy", "Sell", "Be Hired", "Hire" ]
        );
        // and print the list of set flags
        llOwnerSay(wasListToCSV(flags));
    }

The wasGetBitFlags function is a helper function that can be found in the LSL FUSS section.

Notes