Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Daniel Bardi 927 posts 2562 karma points
    Mar 31, 2011 @ 01:40
    Daniel Bardi
    0

    Need sample implementation of getting a token with uREST

    I'm used to the SOAP webservices and am now convinced about REST/JSON..

    I would like to see the process of getting an auth token.

    If I do this in a browser:

    http://www.mysite.com/rest/token?username=myusername&Password=mypassword&type=user

    I get an error:

     

    405 - HTTP verb used to access this page is not allowed.

    What am I doing wrong?  I know it's an easy answer.. 

    Thanks in advanc.

     

  • Matt Brailsford 4125 posts 22224 karma points MVP 9x c-trib
    Mar 31, 2011 @ 08:45
    Matt Brailsford
    0

    Hey Daniel,

    Documentation for the Token service can be found here:

    http://urest4umb.codeplex.com/wikipage?title=Token&referringTitle=Documentation

    What you need to do is create a POST request, rather than a GET request, passing in the username/password and type of auth token you require (user/member), the response to that request will then contain a json object with the auth token contained in the "Value" field.

    Does that answer your question? or do you need an actual code example?

    Cheers

    Matt

  • Matt Brailsford 4125 posts 22224 karma points MVP 9x c-trib
    Mar 31, 2011 @ 08:50
    Matt Brailsford
    0

    PS If you haven't done already, I'd recommend you read the intro page for details on a few of the core principles.

    http://urest4umb.codeplex.com/wikipage?title=Introduction&referringTitle=Documentation

  • Daniel Bardi 927 posts 2562 karma points
    Mar 31, 2011 @ 08:52
    Daniel Bardi
    0

    That makes total sense..  I can do it in .Net, but the next question is from another developer doing some side work for a client.

    He's using Delphi and would like to pull data from Umbraco using REST.  I'm not to kean on Delphi, but that's the case.

    He's getting an error when testing:

    Socket Error #11004

    Any thoughts on that on?

    Thanks

  • Matt Brailsford 4125 posts 22224 karma points MVP 9x c-trib
    Mar 31, 2011 @ 08:56
    Matt Brailsford
    0

    Hey Daniel,

    Crickey, that's a new one, though by the sounds of it, it seems like a DNS error, rather than specifically uREST. From a quick google maybe this will help:

    http://www.techsupportforum.com/forums/f269/socket-error-11004-a-394595.html

    Matt

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies