The Community Forums

Interact with an entire community of cPanel & WHM users.
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

REST Query for getting authenticated session token

Discussion in 'cPanel Developers' started by ck, May 7, 2015.

  1. ck

    ck Member

    Joined:
    Aug 15, 2001
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Hey Guys,

    In view of the latest changes to requiring session tokens by default, is there any REST query which we can use to connect and authenticate a user, which will then return the security token that we can use for subsequent calls?

    The reason why I need this is because our application sits on an external client and attempts to connect to API2 to execute commands. Prior to requiring session tokens, we could parse the username and password in the same query, but now it seems to be a two step process (authenticate -> get security token -> proceed to API commands by embedding security token in endpoint)

    Cheers
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,450
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. ck

    ck Member

    Joined:
    Aug 15, 2001
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the quick response, appreciate it.

    I had checked out the links prior to posting, but could not find any specific information as well as the JSON API to call. We are authenticating under two types of scenarios - WHM root, WHM reseller, and end user cPanel. The last option is what we are trying to find out now whereby a JSON query containing the end user cPanel login credentials is being sent in the first call, and the security token returned in the response. This way we can send the second JSON query embedding the security token.

    If there is any other way around it, i am all ears :)

    Cheers
     
Loading...

Share This Page