Difference between revisions of "Linden Lab Official:Registration API"

From Second Life Wiki
Jump to navigation Jump to search
Line 52: Line 52:
== Using capability URLs ==
== Using capability URLs ==


Reg API [[Capabilities|capabilities]] represent permissions to perform certain actions. The API grants capabilities is through ''capability URLs'' that look like this:
Reg API [[Capabilities|capabilities]] represent permissions to perform certain actions. The API grants capabilities with ''capability URLs'' that look like this:


<pre>
<pre>
Line 62: Line 62:
The form POSTs your "first_name", "last_name" and "password" to https://cap.secondlife.com/get_reg_capabilities to get your capabilities.
The form POSTs your "first_name", "last_name" and "password" to https://cap.secondlife.com/get_reg_capabilities to get your capabilities.


After posting this information, the Reg API will return document that looks something like this:
After posting this information, the Reg API returns a document that looks like this:


<pre>
<pre>
Line 75: Line 75:
This example shows the "get_error_codes" capability. To invoke this capability, follow the capability URL.
This example shows the "get_error_codes" capability. To invoke this capability, follow the capability URL.


How do you register a user? You can only register a user if you have been granted the capability to register users. If you have been granted this capability, the document returned looks like this:
To register a new user (Resident), you must have been granted the capability to register users. If so, then the Reg API returns a document that looks like this:


<pre>
<pre>
Line 95: Line 95:
</pre>
</pre>


Of course, these example capabilities URLs don't actually work. As you can see, the set of capability URLs contains a URL to "create_user", along with many other related capabilities, such as "check_name" and "get_last_names."
Of course, these example capabilities URLs don't actually work.
 
The set includes capability URLs for the following operations:
* create_user - create a new user
* check_name - indicates whether a user can be registered with a given Second Life first name and last name
* get_last_names - returns last names and corresponding IDs with which you are able to register new users.
* get_error_codes - returns the set of error codes
 
For more information on these operations, se [[Registration API Reference]].


=== Guidelines ===
=== Guidelines ===

Revision as of 10:57, 18 February 2009

The Registration API (Reg API) enables you to register new Second Life users on your website, and set the location where they initially appear inworld after they log in. With the Reg API you can:

  • Create and manage your community in Second Life.
  • Maintain your identity from your website through user registration and into Second Life.
  • Track your community in Second Life.


Overview

Use the Reg API to create Second Life accounts within your own registration process on your website. You can customize the Second Life registration process to capture additional information or to fit your registration process. When the 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.

Important limitations and conditions apply. For example, you must make clear that users are establishing a relationship with Linden Lab, separate from their relationship with you.

The Reg API is a simple REST-style web service. Information is passed to and from the service in LLSD XML documents. Linden Lab provides libraries to parse and encode LLSD in Perl, PHP, Python, and Ruby; see Reg API Examples.

How to participate

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.

Important notices

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.

Second Life accounts with Reg API capabilities that have not signed up at least one account within 90 days of their receipt will have their Reg API access removed

All participants in the Reg API program must abide by Linden Lab's API Terms Of Service.

Discussion and support

Features

The Reg API enables you to:

  • Register Second Life Residents from your website and track them.
  • Send them to a location of your choice when they first log in to Second Life.
  • Limit accounts to your estate.
  • Limit name selection, or create accounts with a custom name. You must request custom names separately from the Registration API request. See Custom Name Program for more information.
  • Provide registration for your organization with internal access only.
  • Provide customized and branded registration.

The Reg API does not currently allow you to:

  • Assign new Residents to groups
  • Provide inventory
  • Creating attachments
  • Alter the appearance of the Viewer
  • Alter or control the Resident's outfit
  • Restrict where you can place people upon log-in. 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.
  • Provide load balancing (instead, use the Reg API to selectively set the starting location based on data sent from an LSL script in each location)

Using capability URLs

Reg API capabilities represent permissions to perform certain actions. The API grants capabilities with capability URLs that look like this:

 https://cap.secondlife.com/cap/0/2897456b-6959-473e-9b94-36d8cec1b9c3 

For example, consider the example capabilities form provided on the Second Life website. It requests a description of the capabilities currently granted to you.

The form POSTs your "first_name", "last_name" and "password" to https://cap.secondlife.com/get_reg_capabilities to get your capabilities.

After posting this information, the Reg API returns a document that looks like this:

<llsd>
  <map>
    <key>get_error_codes</key>
    <string>https://cap.secondlife.com/cap/0/e2fd05e0-d4f0-4f04-8805-fdc1bd4e9ea2</string>
  </map>
</llsd>

This example shows the "get_error_codes" capability. To invoke this capability, follow the capability URL.

To register a new user (Resident), you must have been granted the capability to register users. If so, then the Reg API returns a document that looks like this:

<llsd>
  <map>
    <key>create_user</key>
    <string>https://cap.secondlife.com/cap/0/35ff3b8c-a30d-4d18-b29a-e3f7f6c79cb6</string>
    
    <key>check_name</key>
    <string>https://cap.secondlife.com/cap/0/6e528ba1-a8b0-4f6b-8b56-362ee6f5cef8</string>
    
    <key>get_last_names</key>
    <string>https://cap.secondlife.com/cap/0/be4e4d2e-c00a-46cd-bb8d-d17cb8e92c9b</string>
    
    <key>get_error_codes</key>
    <string>https://cap.secondlife.com/cap/0/e75f81a5-b7da-4480-8f95-b1cf9d2d680f</string>
  </map>
</llsd>

Of course, these example capabilities URLs don't actually work.

The set includes capability URLs for the following operations:

  • create_user - create a new user
  • check_name - indicates whether a user can be registered with a given Second Life first name and last name
  • get_last_names - returns last names and corresponding IDs with which you are able to register new users.
  • get_error_codes - returns the set of error codes

For more information on these operations, se Registration API Reference.

Guidelines

Follow these guidelines when using capability URLs in your registration system:

  • 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.

References