Forum Discussion

neel_psl's avatar
8 years ago

Getting an error while generating the session key through URL??

Hi,

I am getting an error while generating the session key through URL, 

i am using below url to generate the session key

http://community.stage.com/restapi/vc/authentication/sessions/login?user.login=USERNAME&user.password=PASSWORD

and i am getting error as

<response status="error">
  <error code="504">
     <message>
        Method 'get' is not supported off of node 'authentication_manager.sessions.login'.
     </message>
   </error>
</response>
 
so what should i do??
 
Thanks
 

5 Replies

  • abmpu's avatar
    abmpu
    Contributor
    7 years ago

    I'm facing the same issue. If I try a POST instead, I'm getting this :

     

    <response status="error">
    <error code="302">
    <message>
    User authentication failed.
    </message>
    </error>
    </response>

    Any idea why?

  • Hi abmpu

     

    Here's an example curl request for session key generation:

    curl -XPOST 'https://yourcommunity.com/restapi/vc/authentication/sessions/login?user.login=<login>&user.password=<password>'

    response is in this format  

    <response status="success">
    <value type="string">NO-1sPyPINXCQUDnQLjxcHnYVgyxF-qE5xIHlyUQzDU.</value>
    </response>

     

    when you are facing below error message may be you are giving wrong credential

    please check your username and password once

    <response status="error">
    <error code="302">
    <message>User authentication failed.</message>
    </error>
    </response>

     

    please refer https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=sessionauth this link for reference  

     

     Give kudos if you find my posts helpful or mark solution if it answers your query.

  • abmpu's avatar
    abmpu
    Contributor
    7 years ago

    Thanks ashok285

    The issue here was that the user was not a native lithium user.

  • abmpu Can you clarify what you mean by "native lithium user"? I'm experiencing the exact symptoms as you described above (the GET error and the POST error). This is a user account that's been working for a long time and suddenly stopped working.