Official Linden Lab® Information: You may access and link to this page, but you may not copy, distribute, modify, adapt, or translate any content on this page. This content is subject to the Terms of Service and is not available under the Creative Commons or any other license.

Overview

The Registration API (Reg API) enables you to register new Second Life users on your website when you require more than just the ability to send people to a location after they complete registration. If you want to have someone register an account and land at a specific location at login, use DirectSLURL.

The Reg API is a simple REST-style web service. Pass information to in LLSD XML documents, and it will also return LLSD data. Linden Lab provides libraries to parse and encode LLSD in Perl, PHP, Python, and Ruby; see Reg API Examples.

In return for some programming effort, the Reg API enables you to:

Limit accounts to your estate

Create accounts with a custom name (with special permission from Linden Lab - see Custom_Name_Program)

Register multiple employees or students from your company or education institution from a single location or as part of your organization's website.

Important limitations and conditions apply:

You must provide Linden Lab's Terms of Service as part of registration, in addition to any terms you require.

You must make clear that users are establishing a relationship with Linden Lab, separate from their relationship with you.

If your page is public, you must manage registration to comply with Linden Lab's policies about alternate accounts and registration verification. In general, Linden Lab will not approve use of the Reg API for public registration, since DirectSLURL is a preferable option.

What the Reg API can do

Use the Reg API to create Second Life accounts during the user registration process on your website. You can customize the Second Life registration process to capture additional information or fit your registration process. When a user registers, they choose a unique Second Life name and password. Registration provides Linden Lab with the same information provided through standard registrations on the Second Life website. At the end of registration, your customer must download the Second Life client, install, and run it. At that time, they will be registered with the account they created on your website and will start Second Life in a location you specify.

With the Reg API, you can:

Register Second Life Residents from your website and track them.

Provide customized and branded registration.

Add newly registered Residents to a Second Life group.

Send them to a location of your choice when they first log in to Second Life.

Limit accounts to your estate.

If Linden Lab has granted permission, limit name selection, or create accounts with a custom name. You must request this permission separately; see Custom Name Program for more information.

Provide registrations for your organization with internal access only, for example using an internal web site.

What the Reg API cannot do

Provide inventory, create attachments, or control the Resident's outfit

Alter the appearance of the Viewer.

Automatically balance load on a sim. Instead, use the Reg API to selectively set the starting location based on data sent from an LSL script in each location.

The Reg API does not prohibit you from setting a starting location to land that you don't own. You must make sure that the owner of the landing location agrees to have the new Residents arrive there if you don't own the land.

How to participate

Before applying, please read the section "Important limitations and conditions apply" above. In general, we only approve requests that involve: limit to estate, custom name, or registration of an organization's members behind their login or firewall. Public registration should use DirectSLURL.

To request participation in the beta Registration API program, submit the Registration API Request Form. Linden Lab will contact you by email after reviewing your application. If you have had a RegAPI account that was recently closed, reapply via the RegAPI Renewal Form.

Important notices

Important: The RegAPI is a beta program that requires some technical proficiency to use successfully. Linden Lab does not currently provide support or technical advice on its use.

Accounts with Reg API capabilities that have not signed up at least one account within 90 days of receipt of the capabilities will have their Reg API access removed.

General procedure

Make sure you have permission from the owner of the estate where your users will appear inworld. You must have permission of the landowner (except for Linden Lab Orientation Islands). If you have multiple registrations and need to send people to different locations, contact us to obtain additional assignments.

Create registrations to test the most common error codes and verify that you receive and properly handle them appropriately.

WHEN TESTING

If you are using the Reg API to sign up registrants on the main grid, users under 18 will not be allowed to register, since they are not permitted on the Main Grid. Therefore, when testing, use a birth date that makes the registrant older than 18 years.

Use an email address that does not currently exist in Second Life. If a user has already registered with an email address, the Reg API will return error 95, email exists.
If you trap errors, you will see this error code, but if not, registration will simply fail.

If you have problems encoding and decoding LLSD, look at the actual LLSD XML being sent and received to start debugging.

Limiting accounts to an estate

You can use the Reg API to limit registrants to the estate of the registrar (the account that controls the registration). You must use the estate ID for the limited_to_estate parameter when creating the account. See create_userfor detals.

Accounts can't access estate

If you're setting registration to 'restrict to estate' and people can't enter your estate, realize that if you've set access controls to require group membership to enter, you must first add the the new users to the requisite group for them to be able to enter your estate.

Alternatively, you can subdivide your estate and create a parcel that has no restrictions, set your landing area there, then add new users to the group(s) to enable them to access the rest of the Estate.

Guidelines and tips

Make sure you're using the account that was enabled for the Registration API to create accounts.

You must use the Registration API to create additional accounts, not the Viewer or the secondlife.com registration page.

Verify you've including your capabilities url (get it at What are Capability URLs) and properly set up your account and the location in the script

Add code to capture and display returned error codes; this will assist you in troubleshooting problems.

Do not hard-code your capabilities URLs. Either code your capabilities URLs as constants, or better yet, obtain them at run-time. Capability URLs will expire eventually, so fresh ones are always better.

Keep your capability URLs secret! The capabilities granted to you are only meant for you. A capability URL is sensitive much like a password. Moreover, Linden Lab tracks the use of each capability.

If using PHP:

The LLSD library has not been tested with PHP5, and is known NOT to work with many common configurations of PHP5. We expect to have and improved version of it available soon, which will be compatible with PHP4 and PHP5. In the meantime, if you have to use PHP5, some folks report using this adapter successfully: http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/