method-users-auth
Last edited: October 29th, 2009 by Colin DevroeAuthenticates an account with Viddler. Returned sessionid is valid for 5 minutes (may change in the future). Every method request which contains valid sessionid, renews its validity time.
Note: ALL arguments are required.
Note: This method supports secure transactions using SSL. Simply change the end-point URL to https://api.viddler.com/rest/v1/
Authentication
This method is what is used to authenticate all methods needing authentication.
Arguments
- method
- Should be set to “Viddler.users.auth”
- api_key
- Assigned Viddler API Key
- user
- The chosen Viddler user name.
- password
- The user’s password with Viddler.
- get_record_token
- If set to “1″ response will also include recordToken
Example Call
http://api.viddler.com/rest/v1/?method=viddler.users.auth&api_key=api_key&user=user&password=mypass
(HTTPS support not yet available)
Example Response
With get_record_token=1 parameter:
<?xml version="1.0" encoding="UTF-8"?> <auth> <sessionid>3116fc111c2e44524b4e239</sessionid> <record_token>5116fc111c3e44524b4e300</record_token> </auth>
Without get_record_token=1 parameter:
<?xml version="1.0" encoding="UTF-8"?> <auth> <sessionid>3116fc111c2e44524b4e239</sessionid> </auth>
Error Codes
Standard error codes plus:
| Error # | Description |
|---|---|
| 101 | Username not found. |
| 102 | This account has been suspended. |
| 103 | Password incorrect for this username. |