Skip to content

Authentication

Login

Authenticates the user and returns the user's API access token.

POST /login
  • email: (string) "{your_email_address}"
  • password: (string) "{your_password}"

Headers

Accept: application/json

Request

json
{
    "email": "{your_email_address}",
    "password": "{your_password}"
}

Response 200

json
{
    "data": {
        "token": "12|aB1CDeFgHi2J6Kl1mNop8qRstuvwx1mWexUYXCsYca12d4e3"
    },
    "message": "Authenticated",
    "status": 200
}

Logout

Logout the user and destroy the user's API access token.

POST /logout

Headers

Accept: application/json
Authorization: Bearer {YOUR_ACCESS_TOKEN}

Response 200

json
{
    "data": [],
    "message": "Logged out",
    "status": 200
}

Tradespring Documentation