Options

REST Newbie needs help on getTree and logout

mahmah Registered Users Posts: 2 Beginner grinner
Just got my API key and trying things out manually posting URLs with Firefox. Can't get Heavy to work with getTree and (of all things) can't logout. Must be missing something simple. Any help much appreciated

-- Michael

(Edited) session is:
https://api.smugmug.com/hack/rest/?method=smugmug.login.withPassword&EmailAddress=...smugmug_login_id...&Password=...password...&Version=1.1.1&APIKey=...key...
<rsp stat="ok">
<method>smugmug.login.withPassword</method>
<SessionID>...sessionid...</SessionID>
<UserID>...userid...</UserID>
<PasswordHash>...hash...</PasswordHash>
</rsp>

https://api.SmugMug.com/hack/rest/beta.mg?method=smugmug.users.getTree&SessionID=...sessionid...&Heavy=1
<rsp stat="ok">
<method>smugmug.users.getTree</method>
<Categories>
<Category id="0">
<Title>Other</Title>
</Category>
...all standard & custom categories, but no album structs...
</Categories>
</rsp>

https://api.SmugMug.com/hack/rest/beta.mg?method=smugmug.users.getTree&SessionID=...sessionid...&Heavy=true
<rsp stat="ok">
<method>smugmug.users.getTree</method>
<Categories>
<Category id="0">
<Title>Other</Title>
</Category>
...all standard & custom categories, but no album structs...
</Categories>
</rsp>

https://api.SmugMug.com/hack/rest/?method=smugmug.logout&SessionID=...sessionid...
<rsp stat="fail">
<err code="3" msg="invalid session"/>
</rsp>

Comments

  • Options
    mahmah Registered Users Posts: 2 Beginner grinner
    edited June 24, 2006
    REST Newbie needs help on getTree and logout (hopefully w/ correctly quoted code)
    Just got my API key and trying things out manually posting URLs with Firefox. Can't get Heavy to work with getTree and (of all things) can't logout. Must be missing something simple. Any help much appreciated

    -- Michael

    (Edited) session is:
    https://api.smugmug.com/hack/rest/?method=smugmug.login.withPassword&EmailAddress=...smugmug_login_id...&Password=...password...&Version=1.1.1&APIKey=...key...
    &lt;rsp stat="ok"&gt;
    &lt;method&gt;smugmug.login.withPassword&lt;/method&gt;
    &lt;SessionID&gt;...sessionid...&lt;/SessionID&gt;
    &lt;UserID&gt;...userid...&lt;/UserID&gt;
    &lt;PasswordHash&gt;...hash...&lt;/PasswordHash&gt;
    &lt;/rsp&gt;
    
    https://api.SmugMug.com/hack/rest/beta.mg?method=smugmug.users.getTree&SessionID=...sessionid...&Heavy=1
    &lt;rsp stat="ok"&gt;
    &lt;method&gt;smugmug.users.getTree&lt;/method&gt;
    &lt;Categories&gt;
    &lt;Category id="0"&gt;
    &lt;Title&gt;Other&lt;/Title&gt;
    &lt;/Category&gt;
    ...all standard & custom categories, but no album structs...
    &lt;/Categories&gt;
    &lt;/rsp&gt;
    
    https://api.SmugMug.com/hack/rest/beta.mg?method=smugmug.users.getTree&SessionID=...sessionid...&Heavy=true
    &lt;rsp stat="ok"&gt;
    &lt;method&gt;smugmug.users.getTree&lt;/method&gt;
    &lt;Categories&gt;
    &lt;Category id="0"&gt;
    &lt;Title&gt;Other&lt;/Title&gt;
    &lt;/Category&gt;
    ...all standard & custom categories, but no album structs...
    &lt;/Categories&gt;
    &lt;/rsp&gt;
    
    https://api.SmugMug.com/hack/rest/?method=smugmug.logout&SessionID=...sessionid...
    &lt;rsp stat="fail"&gt;
    &lt;err code="3" msg="invalid session"/&gt;
    &lt;/rsp&gt;
    
  • Options
    AndyAndy Registered Users Posts: 50,016 Major grins
    edited June 27, 2006
    Michael, standby, and stay tuned, for those that can help you.
Sign In or Register to comment.