UserService.changeRole |

Version 12 - view current page

HTTP MethodURIReturns
POST/UserService/changeRole.doThe user whose role has changed
Overview:
Changes a user's role.

Please note, the algorithm used to generate the developer credential signature has changed. See the description of cred.sig below for more details.
Common Parameters
plus...

Required Parameters:

cred.ts
The current time, expressed as the number of seconds since January 1, 1970 12:00 am GMT. This must be within five minutes of Wetpaint server time. Example data is available.
cred.sig
Developer credential signature. This is calculated as the HMAC-SHA-1 hash of the developer key (the key parameter), the user ID (the user.userId parameter, described below), and the current timestamp (the cred.ts parameter). The key used by the HMAC-SHA-1 algorithm should be the developer secret. For example, in PHP: $sig = hash_hmac( "sha1", $developer_key . $user_id . time(), $developer_secret, FALSE ); Example data is available.
user.userId
Unique ID of user to update.
user.role
New role of user. May have the values registered, moderator, or banned. If not provided, defaults to registered.
output
Currently only api output is supported for this call.
Example Request ( required parameters in red ):

http://wapi.wetpaint.com/userService/changeRole.do?
output=api&
key=yourissueddeveloperkey&
ns=yourassignednamespace&
cred.ts=1208733600&
cred.sig=a67987e9875ffb32&

user.userId=youruser&
user.role=registered