RegAPI Tips

From Second Life Wiki
Revision as of 13:53, 10 July 2007 by Glenn Linden (talk | contribs)
Jump to navigation Jump to search

Back to Reg API Main Page

General Suggestions

  • Make sure you're using the account that was enabled for the Registration API to create accounts.
  • You have to use the Registration API to create additional accounts, not the viewer or the SecondLife.com registration page.
  • Make sure the Curl library is installed and running (see RegAPI Intro )
  • 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
  • Check for error codes
  • Join the RegAPI mailing list and use it for additional information or troubleshooting (To join, go to https://lists.secondlife.com/cgi-bin/mailman/listinfo/regapi).
  • Our current 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/
  • When you are testing the RegAPI, make sure that your birth date makes you older than 18 years and that you are using an email address that does not currently exist in Second Life - the latter will return error 95 (email exists - which you will see if you trap errors, but will cause registration to fail if you don't).
  • We STRONGLY recommend you add code to capture and display returned error codes; this will assist you in troubleshooting problems.

Custom Last Names Suggestions

  • Verify that you can use the RegAPI to create accounts. The problem may be your capabilities URL or your RegAPI script.
  • If you're using a RegAPI account to create accounts using a custom name and can't see the Custom Last Name in the names list, you're probably not using the account that was the billing account for the Custom Last Name. You will need to request a new RegAPI account with the same account as was the billing account for the Custom Last Name.
  • If you want to only display your custom name, you'll have to write code to parse the name list we return or to force your custom name as the last name choice for the registrant.
  • URI_GET_LAST_NAMES returns an associative array where the keys are the ids and the values are the last names. The PHP asort function will sort based on the values:
 $last_names = llsd_get(URI_GET_LAST_NAMES);
 asort($last_names);

(From Alan Levine 2 Jul2007)

Names

  • Names must include at least 2 characters. Only letters and numbers may be used.
  • Certain first names are restricted, including any considered obscene or inappropriate for public use.

Location

  • The location coordinates need to be given with two decimals: Alpha 123.00, 106.00, 23.00
  • Although the documentation says you must be the owner of the estate, in practice we do not limit where you can send registrants. You should obtain previous permission of the estate owner you send registrants to.

Date

The date format is yyyy-mm-dd (dashes separate the dates, and month and day should be 2 digits).