Welcome, guest ( Login )

Powered by JotSpot

WikiHome » 1.2.0 » smugmug.login.withPassword

smugmug.login.withPassword

Version 8, changed by devbobo@gmail.com. 09/13/2007.   Show version history

API Method: smugmug.login.withPassword

This method establishes a session and logs a user in based on the specified email address and password.

NOTE: This is a plaintext password, and thus, should only be sent via SSL.

Most of the other methods require a SessionID, which is returned by this method. Store temporarily and re-use it for all other methods which require SessionID.


Arguments:

Result:

  • struct
    • String "SessionID"
    • String "UserID"?
    • String "NickName"?
    • String "DisplayName"
    • String "PasswordHash"
    • String "AccountType"
    • int "FileSizeLimit"

Fault Codes:

  • 1 - "invalid login"
  • 5 - "system error"
  • 11 - "ancient version"

Using REST from PHP Example:

<?php
$base = 'https://api.smugmug.com/hack/rest/1.1.1/';
$query_string = '';
$params = array(
'method' => "smugmug.login.withPassword",
'EmailAddress' => 'YourSmugmugNickName',
'Password' => 'YourSmugmugPassword',
'APIKey' => 'YourSmugmugAPIKey'
);
foreach ($params as $key => $value) {
$query_string .= "$key=" . urlencode($value) . "&";
}
$url = "$base?$query_string";
$xml = file_get_contents($url);
echo "$xml\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n";
?>

Attachments (0)

  File By Size Attached Ver.