Skip to content

Logout

The API session is destroyed by this call and it invalidates the accessToken. The user will have to login once again after this.


POST: apiV2/logout

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

Request Details

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

Code

curl --X POST 'https://connect.thefirstock.com/apiV2/logout' \
--H 'Content-Type: application/json' \
--d '{
    "userId": "",
    "jKey": ""
}'
from thefirstock import thefirstock

logout = thefirstock.firstock_logout()
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();
}
}

Success Response Details

Parameter Description
Status Success
data Give a successful logout message
requestTime Response received time

Failure Response Details

Parameter Description
Status Failed
data Type of error

Sample Response

{
    "Status": "Success",
    "data": "Successfully logged out",
    "requestTime": "13:25:51 24-08-2022"
}
{
 "Status": "Failed",
 "data": "Invalid Input :  Invalid App Key"
}