Step 1: Authenticate Your UsersThis is a featured page


Data Access API CallUserService.loginRegisters and/or logs in a single user and returns a ticket for future ajax calls.

The user login API call both registers a user and allows them access to features based on their identity ( i.e. the call determines a user's access to content editing and moderation tools ). This login call provides a seamless, no-registration-required experience for your users.

When Wetpaint created your developer key, we also created a private user namespace with which your users will be associated. Along with your developer key, we issued a secret key. Because this secret key allows you to authenticate users and access sensitive data, it should not be made available to the public ( e.g. via browser-side code ).

All Ajax calls made to the Wetpaint servers require a ticket ( basically an active user session ), retrieved via a login call. If the user hasn't been registered before, the login call will automatically register the user in your namespace. Otherwise, we will login the user, updating the user's records if anything in the login request is different from what we already have saved.

The login call returns XML containing a ticket that you should associate with the user's session on your side.

Save The Ticket

Once you have received a ticket for a user, any ajax calls you make on behalf of that user should include it. Typically, the ticket is stored in a cookie or session variable for this purpose. The javascript client application allows users to take actions that require identification and authentication, and thus requires the ticket (which you will set in step 3 of this guide).

User Roles

A user's role determines what actions that user can perform. The roles are registered, moderator, and banned. For example, both registered users and moderators can edit pages, while banned users cannot.


Once logged in, you will use use our data-access API to retrieve information about your users and their activity--including edit histories of content, their reputation, and statistical data. We explain this process beginning with the next step.

Next -> Step 2: Request Javascript Client Application


ryan_wetpaint
ryan_wetpaint
Latest page update: made by ryan_wetpaint , Oct 28 2008, 1:33 PM EDT (about this update About This Update ryan_wetpaint Edited by ryan_wetpaint

1 word added
1 word deleted

view changes

- complete history)
More Info: links to this page
Started By Thread Subject Replies Last Post
Draevin1 Uh, HELP! 0 May 22 2009, 8:12 PM EDT by Draevin1
Thread started: May 22 2009, 8:12 PM EDT  Watch
Hi, i'm new.
i can't figure out were to post the stuff to get my ticket....... Anybody?

-D
Do you find this valuable?    
Keyword tags: None
exoot INVALID_DEVELOPER_KEYdeveloper key is invalid 3 Jan 20 2009, 1:22 PM EST by boe_wetpaint
Thread started: Jan 16 2009, 6:25 AM EST  Watch
WTH!! help me
INVALID_DEVELOPER_KEYdeveloper key is invalid

<?php
$test = true;
$host = ($test) ? 'togo.wetpaint.com' : 'wapi.wetpaint.com';
$path = '/UserService/login.do';
$devkey = 'I know';
$secret = 'Its secret';
$user_id = 'obama';
$ts = time();
$sig = hash_hmac( "sha1", $devkey . $user_id . $ts, $secret, FALSE );
$parameters = array();
$parameters['output'] = 'api';
$parameters['key'] = $devkey;
$parameters['ns'] = 'evolanding';
$parameters['cred.ts'] = $ts;
$parameters['cred.sig'] = $sig;
$parameters['user.userId'] = $user_id;
$parameters['user.email'] = 'jt%40evolanding.com';
$parameters['user.emailOptIn'] = 'false';


include "Snoopy.class.php";

$snoopy = new Snoopy;
$urlbase = 'http://togo.wetpaint.com/UserService/login.do';
$snoopy->submit($urlbase,$parameters);
print $snoopy->results;
?>
INVALID_DEVELOPER_KEYdeveloper key is invalid!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Do you find this valuable?    
Show Last Reply
bennyflint Authentication Questions 0 Apr 21 2008, 6:12 PM EDT by bennyflint
Thread started: Apr 21 2008, 6:12 PM EDT  Watch
You can post any questions about user authentication here. Or, if you like, create your own thread.
Do you find this valuable?    
Keyword tags: authentication help
Showing 3 of 3 threads for this page

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)