Get Current User API - abi-abishek/API-Development GitHub Wiki

Can be used to check the validity of the access token.

Request

POST /auth/current

Response

There are 3 types of responses.

Status Code Description
200 Name of the user will Display
403 unauthorized user
400 Bad request or Token expired

Examples

200 OK
{
    "username": "name of the user"
}
403 Forbidden Error
{
    "error": "unauthorized user"
}
400 Bad Request
{
    "error": "Expired token" or "error": "Bad request"
}