API: Handle verification

From Star Wars Combine :: Game Guide
Jump to: navigation, search

<< API: Getting started

API: Handle verification

Whatever your application does, it probably allows for SWC players to sign up.

You might want to know if a handle actually exists in SWC.

Handle check resource

The character handle you wish to verify needs to be passed via URL.


Note, that

a) you need to URL-encode it and

b) upper/lower case doesn't matter.

If you pass an invalid handle


the response will be an error message accompanied by a 404 HTTP result code:

<error>Not Found</error>

If the handle is actually valid and properly encoded


you'll see something like this:

<?xml version="1.0" encoding="UTF-8"?>
<handlecheck xmlns="[...]" version="1.0" timestamp-swc="[swcTime]">
  <handle>Olwin Froon</handle>

The response provides the character's UID (a unique entity identifier) as well as the handle itself in proper upper/lower case writing.

For anything else you want to do with that character, you need their UID, so make sure you store it in a suitable place.