API: Handle verification

From Star Wars Combine :: Game Guide
Revision as of 13:54, 28 July 2015 by Olwin Froon (talk | contribs) (Created page with '== 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. == …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

/handle/[characterHandle]

Note, that

a) you need to URL-encode it twice and

b) upper/lower case doesn't matter.


If you pass an invalid handle

http://www.swcombine.com:8081/ws/v1.0/handle/iMadeThisUp

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

<error>Not Found</error>


If the handle is actually valid

http://www.swcombine.com:8081/ws/v1.0/handle/olwin%2Bfroon

you'll see something like this:

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

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 proper place.