Skip to content

Logout

The API session is destroyed by this call and it invalidates the accessToken. The user will be sent through a new login flow after this.

POST: /logout

https://connect.thefirstock.com/api/logout

Request Details

Parameter Description
userId User Id of the login user
jKey Token Received from Login API

Code

from thefirstock import thefirstock

logout = thefirstock.firstock_logout()
curl -X POST 'https://connect.thefirstock.com/api/logout'' \
     -H 'Content-Type: application/json' \
     -d '{
            "userId": "",
            "jKey": ""
         }'
const Firstock = require('thefirstock');

const firstock = new Firstock();

firstock.logout((err, result)=>{
    console.log("Error, ",err)
    console.log("Result: ",result)
})
using thefirstock;

class Program
{
public static void Main()
{
    Firstock firstock = new Firstock();
    var logout = firstock.logout();
}
}

Response Details

Parameter Description
stat Ok or Not_Ok
requestTime It will be present only on successful logout.
emsg This will be present only if Logout fails.

Sample Response

{
    "stat": "Ok",
    "request_time": "23:36:18 29-05-2022"
}
{
    "stat": "Not_Ok",
    "emsg": "Server Timeout : "
}